Class: Defgen::Property

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize {|_self, attributes| ... } ⇒ Property

Returns a new instance of Property.

Yields:

Yield Parameters:



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

#attributesObject

Returns the value of attribute attributes.



4
5
6
# File 'lib/defgen/property.rb', line 4

def attributes
  @attributes
end

#message_prefixObject

Returns the value of attribute message_prefix.



4
5
6
# File 'lib/defgen/property.rb', line 4

def message_prefix
  @message_prefix
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/defgen/property.rb', line 4

def name
  @name
end

#objc_typeObject

Returns the value of attribute objc_type.



4
5
6
# File 'lib/defgen/property.rb', line 4

def objc_type
  @objc_type
end

#object_setterObject

Returns the value of attribute object_setter.



4
5
6
# File 'lib/defgen/property.rb', line 4

def object_setter
  @object_setter
end

#prefixObject

Returns the value of attribute prefix.



4
5
6
# File 'lib/defgen/property.rb', line 4

def prefix
  @prefix
end

Instance Method Details

#get_bindingObject



25
26
27
# File 'lib/defgen/property.rb', line 25

def get_binding
  binding
end

#keyObject



17
18
19
# File 'lib/defgen/property.rb', line 17

def key
  "#{prefix.upcase}#{name.upcase_first}"
end

#parameterObject



21
22
23
# File 'lib/defgen/property.rb', line 21

def parameter
  name
end