Class: SwiftGenerator::SwiftMethod

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

Instance Attribute Summary

Attributes inherited from SwiftMethodBase

#access_control_modifier, #argStr, #bodyLines, #comment, #func_qualifiers, #indent, #name, #override, #returns

Instance Method Summary collapse

Methods inherited from SwiftMethodBase

#<<, #_i, #_o, #ii

Constructor Details

#initialize(swift_element, name, argStr, returns, override: false, comment: nil) ⇒ SwiftMethod

Returns a new instance of SwiftMethod.



1363
1364
1365
1366
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1363

def initialize (swift_element, name, argStr, returns, override: false, comment: nil)
	super(swift_element, name, argStr, returns, override:override, comment:comment)
	swift_element.methods << self
end

Instance Method Details

#func_fragmentObject



1368
1369
1370
1371
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1368

def func_fragment()
	return 'func' if func_qualifiers.nil?
	return [*func_qualifiers].join( ' ' ) + ' func'
end