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.



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

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.



196
197
198
# File 'lib/rest_kat.rb', line 196

def json_type
  @json_type
end

#nodeObject

Returns the value of attribute node.



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

def node
  @node
end

#objc_classObject

Returns the value of attribute objc_class.



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

def objc_class
  @objc_class
end

Instance Method Details

#enumObject



206
207
208
# File 'lib/rest_kat.rb', line 206

def enum
  node["enum"]
end

#enum?Boolean

Returns:

  • (Boolean)


202
203
204
# File 'lib/rest_kat.rb', line 202

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