Class: Defgen::Property
- Inherits:
-
Object
- Object
- Defgen::Property
- Defined in:
- lib/defgen/property.rb,
lib/defgen/property/attributes.rb
Defined Under Namespace
Classes: Attributes, UnsupportedOwnershipError
Constant Summary collapse
- VALID_TYPES =
['NSData *', 'NSArray *', 'BOOL ', 'NSDictionary *', 'float ', 'NSInteger ', 'id ', 'NSString *', 'double ', 'NSURL *']
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#message_prefix ⇒ Object
Returns the value of attribute message_prefix.
-
#name ⇒ Object
Returns the value of attribute name.
-
#objc_type ⇒ Object
Returns the value of attribute objc_type.
-
#object_setter ⇒ Object
Returns the value of attribute object_setter.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize {|_self, attributes| ... } ⇒ Property
constructor
A new instance of Property.
- #key ⇒ Object
- #parameter ⇒ Object
Constructor Details
#initialize {|_self, attributes| ... } ⇒ Property
Returns a new instance of Property.
6 7 8 9 10 |
# File 'lib/defgen/property.rb', line 6 def initialize self.attributes = Attributes.new self.attributes.property = self yield self, attributes if block_given? end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def attributes @attributes end |
#message_prefix ⇒ Object
Returns the value of attribute message_prefix.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def @message_prefix end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def name @name end |
#objc_type ⇒ Object
Returns the value of attribute objc_type.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def objc_type @objc_type end |
#object_setter ⇒ Object
Returns the value of attribute object_setter.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def object_setter @object_setter end |
#prefix ⇒ Object
Returns the value of attribute prefix.
4 5 6 |
# File 'lib/defgen/property.rb', line 4 def prefix @prefix end |
Instance Method Details
#get_binding ⇒ Object
25 26 27 |
# File 'lib/defgen/property.rb', line 25 def get_binding binding end |
#key ⇒ Object
17 18 19 |
# File 'lib/defgen/property.rb', line 17 def key "#{prefix.upcase}#{name.upcase_first}" end |
#parameter ⇒ Object
21 22 23 |
# File 'lib/defgen/property.rb', line 21 def parameter name end |