Class: StringEnumPropertyType

Inherits:
SwiftPropertyType show all
Defined in:
lib/swift_generator/code_generation/swift_types.rb

Instance Attribute Summary collapse

Attributes inherited from SwiftPropertyType

#auto_bridged, #custom_equality_test, #custom_marshaling, #custom_unmarshaling, #hashable_value_lambda, #serialized_json_type, #swift_kind, #swift_type_name, #swift_type_symbol, #test_value_lambda

Instance Method Summary collapse

Methods inherited from SwiftPropertyType

all_swift_kinds, #hashable_value, #make_test_value

Constructor Details

#initialize(enum, serialized_json_type, test_value: lambda{|num| 'undefined' }) ⇒ StringEnumPropertyType

Returns a new instance of StringEnumPropertyType.



59
60
61
62
# File 'lib/swift_generator/code_generation/swift_types.rb', line 59

def initialize( enum, serialized_json_type, test_value:lambda{|num| 'undefined' }  )
	super( enum.swift_type_symbol, serialized_json_type, swift_kind: :enum, test_value:test_value )
	@enum = enum
end

Instance Attribute Details

#enumObject

Returns the value of attribute enum.



57
58
59
# File 'lib/swift_generator/code_generation/swift_types.rb', line 57

def enum
  @enum
end