• Stars
    star
    120
  • Rank 286,057 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Prints human-readable information about an instance

AutoDescribe

Prints human-readable information about an instance.

The problem

You pretty print objects using NSLog(@"firstName: %@ lastName:%@ age: %@", ...). It takes forever to write NSLog. Classes evolves and the properties changes. NSLog's are rarely in sync with the properties.

Solution

AutoDescribe is like PHP's var_dump and print_r. All properties are pretty printed.

Sample code

#import <AutoDescribe/NSObject+AutoDescribe.h>

// A class with some properties
@interface TestPerson : NSObject
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong) NSNumber *age;
@end

@implementation TestPerson
// empty
@end

// Create instance of class and invoke autoDescribe
TestPerson *person = [TestPerson new];
person.firstName = @"John";
person.lastName = @"Doe";
person.age = [NSNumber numberWithFloat:33.33];
NSLog(@"%@", [person autoDescribe]);

Output from sample code

firstName=John
lastName=Doe
age=33.3

Podfile

If your want the latest version, then add this to your Podfile

pod 'AutoDescribe', :git => 'https://github.com/neoneye/autodescribe.git'

Contact

Simon Strandgaard

License

This code is distributed under the terms and conditions of the MIT license.

Change-log

Version 1.0.0 @ 06.04.2013

  • Full cocoapods support.

More Repositories

1

SwiftyFORM

iOS framework for creating forms
Swift
1,078
star
2

newton-commander

Dual-pane file manager with tabs for macOS
Objective-C
65
star
3

SpecificationPattern

Specification pattern implemented in swift (iOS/OSX)
Swift
45
star
4

AnalyzeCopy

Metadata is lost when copying files around. It happens with cp, tar, rsync, Finder, Transmit, PathFinder. etc.
Ruby
24
star
5

SwiftSnakeEngine

YOU vs AI, in the classic snake game!
Swift
16
star
6

arc-notes

My writings about ARC (Abstraction and Reasoning Corpus)
13
star
7

osxutils

improvements to Sveinbjorn Thordarson osxutils
C
10
star
8

SwiftyRelativePath

Swift equivalent of Ruby's "Pathname.relative_path_from()"
Swift
9
star
9

ARC-Interactive

Enjoy puzzle-solving directly in your browser.
JavaScript
7
star
10

SSEventFlow

SSEventFlow is a type safe alternative to NotificationCenter, inspired by Flux
Swift
6
star
11

arc-dataset-collection

Multiple datasets for ARC (Abstraction and Reasoning Corpus)
Python
5
star
12

SwiftyServerRouter-Demo

Proof of concept generating documentation for all endpoints
Swift
5
star
13

rubikswift

Rubiks cube experiments
Swift
5
star
14

interactive-prime-number-patterns

What does the prime numbers look like?
HTML
4
star
15

simon-arc-env

Abstraction and Reasoning Corpus as a Farama Gymnasium environment.
Python
2
star
16

ARC-Interactive-History-Dataset

The history files when recording human interaction while solving ARC tasks
Python
2
star
17

SwiftySchwartzianTransform

Advanced overkill sort operation for the swift language
Swift
2
star
18

cocoaheads-2013-game0

cocoaheads game in an evening
Objective-C
2
star
19

aeditor

AEditor is a programmers text editor written entirely in Ruby
Ruby
1
star
20

arc_baseline

Python
1
star
21

mac_chat_client

Simple chat bot UI for Mac
Swift
1
star
22

loda-outlier-programs

Incorrect LODA programs that diverges after a number of terms
Assembly
1
star
23

arc-prompt

Prompts for solving ARC (Abstraction and Reasoning Corpus) with GPT4 or similar
1
star
24

loda-patterns

Collection of patterns in LODA programs.
Assembly
1
star
25

neoneye

Config files for my GitHub profile.
1
star
26

arcathon-docker-image

1
star
27

loda-arc-challenge

Abstraction and Reasoning Corpus (ARC) solutions
Assembly
1
star