Class: TypeString
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.
119
120
121
|
# File 'lib/ObjCGenerator/types.rb', line 119
def varname
@varname
end
|
Instance Method Details
#conversion_value(origin) ⇒ Object
126
127
128
|
# File 'lib/ObjCGenerator/types.rb', line 126
def conversion_value origin
"[#{origin} description]"
end
|
#copyrow(newVarName) ⇒ Object
138
139
140
|
# File 'lib/ObjCGenerator/types.rb', line 138
def copyrow newVarName
"#{newVarName}.#{self.varname} = [self.#{self.varname} copy];"
end
|
#default_value ⇒ Object
123
124
125
|
# File 'lib/ObjCGenerator/types.rb', line 123
def default_value
"@\"\""
end
|
#description_row ⇒ Object
135
136
137
|
# File 'lib/ObjCGenerator/types.rb', line 135
def description_row
"@\"self.#{self.varname} = %@\" , self.#{self.varname}"
end
|
#hash_row ⇒ Object
141
142
143
|
# File 'lib/ObjCGenerator/types.rb', line 141
def hash_row
"[self.#{self.varname} hash];"
end
|
#inEquality_test(other) ⇒ Object
132
133
134
|
# File 'lib/ObjCGenerator/types.rb', line 132
def inEquality_test other
"![self.#{self.varname} isEqual:#{other}.#{self.varname}]"
end
|
#property_definition ⇒ Object
120
121
122
|
# File 'lib/ObjCGenerator/types.rb', line 120
def property_definition
"@property (nonatomic) NSString *#{@varname};"
end
|
#to_dictionary_item ⇒ Object
129
130
131
|
# File 'lib/ObjCGenerator/types.rb', line 129
def to_dictionary_item
"@\"#{@varname}\" : self.#{@varname} ?: @\"\""
end
|