Class: RestKat::ObjCPrimitiveType

Inherits:
ObjCType
  • Object
show all
Defined in:
lib/rest_kat.rb

Instance Attribute Summary collapse

Attributes inherited from ObjCType

#cached

Instance Method Summary collapse

Methods inherited from ObjCType

#objc_property_arg_decl, #objc_property_decl

Constructor Details

#initialize(objc_class, json_type, node) ⇒ ObjCPrimitiveType

Returns a new instance of ObjCPrimitiveType.



190
191
192
# File 'lib/rest_kat.rb', line 190

def initialize objc_class, json_type, node
    super objc_class, json_type, node
end

Instance Attribute Details

#json_typeObject

Returns the value of attribute json_type.



188
189
190
# File 'lib/rest_kat.rb', line 188

def json_type
  @json_type
end

#nodeObject

Returns the value of attribute node.



189
190
191
# File 'lib/rest_kat.rb', line 189

def node
  @node
end

#objc_classObject

Returns the value of attribute objc_class.



187
188
189
# File 'lib/rest_kat.rb', line 187

def objc_class
  @objc_class
end

Instance Method Details

#enumObject



198
199
200
# File 'lib/rest_kat.rb', line 198

def enum
  node["enum"]
end

#enum?Boolean

Returns:

  • (Boolean)


194
195
196
# File 'lib/rest_kat.rb', line 194

def enum?
  (node["type"] == "str") && node.has_key?("enum")
end