Class: TypeString

Inherits:
ObjCType show all
Defined in:
lib/ObjCGenerator/types.rb

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

#varnameObject

Returns the value of attribute varname.



106
107
108
# File 'lib/ObjCGenerator/types.rb', line 106

def varname
  @varname
end

Instance Method Details

#conversion_value(origin) ⇒ Object



113
114
115
# File 'lib/ObjCGenerator/types.rb', line 113

def conversion_value origin
  "[#{origin} description]"
end

#copyrow(newVarName) ⇒ Object



125
126
127
# File 'lib/ObjCGenerator/types.rb', line 125

def copyrow newVarName
  "#{newVarName}.#{self.varname}  = [self.#{self.varname} copy];"
end

#default_valueObject



110
111
112
# File 'lib/ObjCGenerator/types.rb', line 110

def default_value
  "@\"\""
end

#description_rowObject



122
123
124
# File 'lib/ObjCGenerator/types.rb', line 122

def description_row
  "@\"self.#{self.varname} = %@\" , self.#{self.varname}"
end

#inEquality_test(other) ⇒ Object



119
120
121
# File 'lib/ObjCGenerator/types.rb', line 119

def inEquality_test other
  "![self.#{self.varname}  isEqual:#{other}.#{self.varname}]"
end

#property_definitionObject



107
108
109
# File 'lib/ObjCGenerator/types.rb', line 107

def property_definition
  "@property (nonatomic) NSString *#{@varname};"
end

#to_dictionary_itemObject



116
117
118
# File 'lib/ObjCGenerator/types.rb', line 116

def to_dictionary_item
  "@\"#{@varname}\" : self.#{@varname}  ?: @\"\""
end