Class: SwiftGenerator::SwiftBlockProperty

Inherits:
SwiftProperty show all
Defined in:
lib/swift_generator/code_generation/swift_class_generation.rb

Instance Attribute Summary collapse

Attributes inherited from SwiftProperty

#access_control_modifiers, #collection_type, #getter_body, #initialization_value, #is_persistent, #mutability_type, #property_name, #property_qualifiers, #property_type, #property_type_symbol, #protocol_get_set_spec, #required, #rest_omit, #setter_body, #swift_class

Instance Method Summary collapse

Methods inherited from SwiftProperty

#declaration_lines, #is_array_of_nsobject, #is_optional, #make_test_value

Constructor Details

#initialize(swift_class, property_name, declaration_string, mutability = :let, initialization_value: nil, required: false) ⇒ SwiftBlockProperty

Returns a new instance of SwiftBlockProperty.



1017
1018
1019
1020
1021
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1017

def initialize( swift_class, property_name, declaration_string, mutability= :let, initialization_value:nil, required: false )

		super(swift_class, property_name, property_type_symbol, mutability= :let, initialization_value:nil, collection_type: nil, required: required, rest_omit:true )
		@declaration_string = declaration_string
end

Instance Attribute Details

#declaration_stringObject

Returns the value of attribute declaration_string.



1015
1016
1017
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1015

def declaration_string
  @declaration_string
end

Instance Method Details

#full_type_specifierObject



1027
1028
1029
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1027

def full_type_specifier
	return @declaration_string
end

#property_declared_typeObject



1031
1032
1033
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1031

def property_declared_type
	@declaration_string + @mutability_type.declaration_wrapping
end

#resolve_typeObject



1023
1024
1025
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1023

def resolve_type()
	@property_type = @declaration_string
end