class RestKat::ObjCMapType
Attributes
properties[RW]
resource[RW]
sequence_of[RW]
Public Class Methods
new(objc_class, json_type, node)
click to toggle source
Calls superclass method
RestKat::ObjCType::new
# File lib/rest_kat.rb, line 279 def initialize objc_class, json_type, node super objc_class, json_type, node self.properties = nil self.cached = false end
Public Instance Methods
cached=(val)
click to toggle source
# File lib/rest_kat.rb, line 220 def cached=val @cached = val if properties properties.each do |property| property.klass.cached = val end end end
cached?()
click to toggle source
# File lib/rest_kat.rb, line 216 def cached? cached end
has_many_maps_properties()
click to toggle source
# File lib/rest_kat.rb, line 253 def has_many_maps_properties properties.select do |p| p.klass.is_a? ObjCSequenceOfMap end end
has_many_primitives_properties()
click to toggle source
# File lib/rest_kat.rb, line 247 def has_many_primitives_properties properties.select do |p| p.klass.is_a? ObjCSequenceOfPrimitve end end
has_many_properties()
click to toggle source
# File lib/rest_kat.rb, line 241 def has_many_properties properties.select do |p| p.klass.is_a? ObjCSequence end end
has_one_properties()
click to toggle source
# File lib/rest_kat.rb, line 235 def has_one_properties properties.select do |p| p.klass.is_a? ObjCMapType end end
objc_properites_arg_list_decl()
click to toggle source
# File lib/rest_kat.rb, line 273 def objc_properites_arg_list_decl properties.reject{|p| p.name == 'id'}.map do |p| p.klass.objc_property_arg_decl p.name end.join "\n " end
objc_protocols()
click to toggle source
# File lib/rest_kat.rb, line 267 def objc_protocols ["NSCopying"].tap do |p| p << "MSRestResource" if resource end.join ', ' end
objc_super_class()
click to toggle source
# File lib/rest_kat.rb, line 259 def objc_super_class if resource "MSRestSerializableResource" else "MSRestSerializable" end end
primitive_properties()
click to toggle source
# File lib/rest_kat.rb, line 229 def primitive_properties properties.select do |p| p.klass.is_a? ObjCPrimitiveType end end