Class: Chelsy::Type::Function

Inherits:
Derived show all
Defined in:
lib/chelsy/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#fragments, #post_fragments

Instance Method Summary collapse

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

#paramsObject (readonly)

Returns the value of attribute params.



432
433
434
# File 'lib/chelsy/ast.rb', line 432

def params
  @params
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



432
433
434
# File 'lib/chelsy/ast.rb', line 432

def return_type
  @return_type
end