Getting a string value for a property of a class with autocompletion feature and checking it at compile-time is very useful.
Get the property name for a class:
@interface AnyClass : NSObject
@property (strong) NSData *data;
// | |
// UITabBarController+HideTabBar.h | |
// | |
// Created by Joshua Greene on 9/26/13. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
$VERBOSE = nil | |
require File.expand_path('../rooby', __FILE__) | |
Person = Rooby::Class.new 'Person' do | |
define :initialize do |name| | |
@name = name | |
end | |
define :name do |
Ok, so Inheritance
its not just for young white dudes waiting for their grandparents to fucking keel over at 82.
In ruby, Inheritance allows one class to inherit from another class attributes and behaviors (methods) that it didnt have before. The inheriter, much like a young white male, is the child class. The class that it inherits from, rather than being his old money grandparents, is the Parent Class. The lesson says Inheritance is designated with a < symbol, for example:
class Daughter < Father
end