Class: SwiftGenerator::SwiftMethod
- Inherits:
-
SwiftMethodBase
- Object
- SwiftMethodBase
- SwiftGenerator::SwiftMethod
- Defined in:
- lib/swift_generator/code_generation/swift_class_generation.rb
Instance Attribute Summary
Attributes inherited from SwiftMethodBase
#access_control_modifiers, #argStr, #bodyLines, #comment, #func_qualifiers, #indent, #name, #override, #returns
Instance Method Summary collapse
- #func_fragment ⇒ Object
-
#initialize(swift_element, name, argStr, returns, override: false, comment: nil) ⇒ SwiftMethod
constructor
A new instance of SwiftMethod.
Methods inherited from SwiftMethodBase
Constructor Details
#initialize(swift_element, name, argStr, returns, override: false, comment: nil) ⇒ SwiftMethod
Returns a new instance of SwiftMethod.
1418 1419 1420 1421 |
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1418 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_fragment ⇒ Object
1423 1424 1425 1426 |
# File 'lib/swift_generator/code_generation/swift_class_generation.rb', line 1423 def func_fragment() return 'func' if func_qualifiers.nil? return [*func_qualifiers].join( ' ' ) + ' func' end |