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.
81
82
83
|
# File 'lib/ObjCGenerator/types.rb', line 81
def varname
@varname
end
|
Instance Method Details
#conversion_value(origin) ⇒ Object
88
89
90
|
# File 'lib/ObjCGenerator/types.rb', line 88
def conversion_value origin
"[#{origin} doubleValue]"
end
|
#copyrow(newVarName) ⇒ Object
100
101
102
|
# File 'lib/ObjCGenerator/types.rb', line 100
def copyrow newVarName
"#{newVarName}.#{self.varname} = self.#{self.varname};"
end
|
#default_value ⇒ Object
85
86
87
|
# File 'lib/ObjCGenerator/types.rb', line 85
def default_value
"0."
end
|
#description_row ⇒ Object
97
98
99
|
# File 'lib/ObjCGenerator/types.rb', line 97
def description_row
"@\"self.#{self.varname} = %lf\" , self.#{self.varname}"
end
|
#inEquality_test(other) ⇒ Object
94
95
96
|
# File 'lib/ObjCGenerator/types.rb', line 94
def inEquality_test other
"self.#{self.varname} != #{other}.#{self.varname}"
end
|
#property_definition ⇒ Object
82
83
84
|
# File 'lib/ObjCGenerator/types.rb', line 82
def property_definition
"@property (nonatomic) double #{@varname};"
end
|
#to_dictionary_item ⇒ Object
91
92
93
|
# File 'lib/ObjCGenerator/types.rb', line 91
def to_dictionary_item
"@\"#{@varname}\" : @(self.#{@varname}) ?: @(0.)"
end
|