Class: Rucoa::Definitions::MethodParameterDefinition
- Defined in:
- lib/rucoa/definitions/method_parameter_definition.rb
Overview
Represents method parameter definition.
Instance Attribute Summary collapse
- #name ⇒ String readonly
- #types ⇒ Array<String> readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name:, types:) ⇒ MethodParameterDefinition
constructor
A new instance of MethodParameterDefinition.
- #to_hash ⇒ Hash{Symbol => Object}
Constructor Details
#initialize(name:, types:) ⇒ MethodParameterDefinition
Returns a new instance of MethodParameterDefinition.
15 16 17 18 19 20 21 22 |
# File 'lib/rucoa/definitions/method_parameter_definition.rb', line 15 def initialize( name:, types: ) super() @name = name @types = types end |
Instance Attribute Details
#name ⇒ String (readonly)
8 9 10 |
# File 'lib/rucoa/definitions/method_parameter_definition.rb', line 8 def name @name end |
#types ⇒ Array<String> (readonly)
11 12 13 |
# File 'lib/rucoa/definitions/method_parameter_definition.rb', line 11 def types @types end |
Instance Method Details
#to_hash ⇒ Hash{Symbol => Object}
25 26 27 28 29 30 |
# File 'lib/rucoa/definitions/method_parameter_definition.rb', line 25 def to_hash { name: name, types: types } end |