Class: Chelsy::Type::Function
- Defined in:
- lib/chelsy/ast.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(return_type, params, **rest) ⇒ Function
constructor
A new instance of Function.
Methods inherited from Base
#const?, #qualified?, #volatile?
Constructor Details
#initialize(return_type, params, **rest) ⇒ Function
Returns a new instance of Function.
434 435 436 437 438 439 |
# File 'lib/chelsy/ast.rb', line 434 def initialize(return_type, params, **rest) @return_type = Syntax::Type.ensure(return_type) @params = ProtoParamList.new(params) super(**rest) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
432 433 434 |
# File 'lib/chelsy/ast.rb', line 432 def params @params end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
432 433 434 |
# File 'lib/chelsy/ast.rb', line 432 def return_type @return_type end |