Class: TypeInt
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.
63
64
65
|
# File 'lib/ObjCGenerator/types.rb', line 63
def varname
@varname
end
|
Instance Method Details
#conversion_value(origin) ⇒ Object
70
71
72
|
# File 'lib/ObjCGenerator/types.rb', line 70
def conversion_value origin
"[#{origin} integerValue]"
end
|
#copyrow(newVarName) ⇒ Object
82
83
84
|
# File 'lib/ObjCGenerator/types.rb', line 82
def copyrow newVarName
"#{newVarName}.#{self.varname} = self.#{self.varname};"
end
|
#default_value ⇒ Object
67
68
69
|
# File 'lib/ObjCGenerator/types.rb', line 67
def default_value
"0"
end
|
#description_row ⇒ Object
79
80
81
|
# File 'lib/ObjCGenerator/types.rb', line 79
def description_row
"@\"self.#{self.varname} = %zd\" , self.#{self.varname}"
end
|
#hash_row ⇒ Object
85
86
87
|
# File 'lib/ObjCGenerator/types.rb', line 85
def hash_row
"self.#{self.varname};"
end
|
#inEquality_test(other) ⇒ Object
76
77
78
|
# File 'lib/ObjCGenerator/types.rb', line 76
def inEquality_test other
"self.#{self.varname} != #{other}.#{self.varname}"
end
|
#property_definition ⇒ Object
64
65
66
|
# File 'lib/ObjCGenerator/types.rb', line 64
def property_definition
"@property (nonatomic) NSInteger #{@varname};"
end
|
#to_dictionary_item ⇒ Object
73
74
75
|
# File 'lib/ObjCGenerator/types.rb', line 73
def to_dictionary_item
"@\"#{@varname}\" : @(self.#{@varname}) ?: @(0)"
end
|