Class: TypeFloat
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from ObjCType
#initialize
Constructor Details
This class inherits a constructor from ObjCType
Instance Attribute Details
#varname ⇒ Object
Returns the value of attribute varname.
91
92
93
|
# File 'lib/ObjCGenerator/types.rb', line 91
def varname
@varname
end
|
Instance Method Details
#conversion_value(origin) ⇒ Object
98
99
100
|
# File 'lib/ObjCGenerator/types.rb', line 98
def conversion_value origin
"[#{origin} doubleValue]"
end
|
#copyrow(newVarName) ⇒ Object
110
111
112
|
# File 'lib/ObjCGenerator/types.rb', line 110
def copyrow newVarName
"#{newVarName}.#{self.varname} = self.#{self.varname};"
end
|
#default_value ⇒ Object
95
96
97
|
# File 'lib/ObjCGenerator/types.rb', line 95
def default_value
"0."
end
|
#description_row ⇒ Object
107
108
109
|
# File 'lib/ObjCGenerator/types.rb', line 107
def description_row
"@\"self.#{self.varname} = %lf\" , self.#{self.varname}"
end
|
#hash_row ⇒ Object
113
114
115
|
# File 'lib/ObjCGenerator/types.rb', line 113
def hash_row
"self.#{self.varname};"
end
|
#inEquality_test(other) ⇒ Object
104
105
106
|
# File 'lib/ObjCGenerator/types.rb', line 104
def inEquality_test other
"self.#{self.varname} != #{other}.#{self.varname}"
end
|
#property_definition ⇒ Object
92
93
94
|
# File 'lib/ObjCGenerator/types.rb', line 92
def property_definition
"@property (nonatomic) double #{@varname};"
end
|
#to_dictionary_item ⇒ Object
101
102
103
|
# File 'lib/ObjCGenerator/types.rb', line 101
def to_dictionary_item
"@\"#{@varname}\" : @(self.#{@varname}) ?: @(0.)"
end
|