class TypeDate

Attributes

varname[RW]

Public Instance Methods

conversion_value(origin) click to toggle source
# File lib/ObjCGenerator/types.rb, line 154
def conversion_value origin
  "[NSDate ic_dateFromIso8601String:#{origin}]"
end
copyrow(newVarName) click to toggle source
# File lib/ObjCGenerator/types.rb, line 166
def copyrow newVarName
  "#{newVarName}.#{self.varname}  = [self.#{self.varname} copy];"
end
default_value() click to toggle source
# File lib/ObjCGenerator/types.rb, line 151
def default_value
  "[NSDate dateWithTimeIntervalSince1970:0.]"
end
description_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 163
def description_row
  "@\"self.#{self.varname} = %@\" , [self.#{self.varname} ic_iso8601String]"
end
hash_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 169
def hash_row
  "[self.#{self.varname} hash];"
end
inEquality_test(other) click to toggle source
# File lib/ObjCGenerator/types.rb, line 160
def inEquality_test other
  "![self.#{self.varname}  isEqualToDate:#{other}.#{self.varname}]"
end
property_definition() click to toggle source
# File lib/ObjCGenerator/types.rb, line 148
def property_definition
  "@property (nonatomic) NSDate *#{@varname};"
end
to_dictionary_item() click to toggle source
# File lib/ObjCGenerator/types.rb, line 157
def to_dictionary_item
  "@\"#{@varname}\" : [self.#{@varname} ic_iso8601String]  ?: @\"\""
end