Class: Stark::Parser::AST::Function

Inherits:
Node
  • Object
show all
Defined in:
lib/stark/ast.rb,
lib/stark/raw_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, return_type, arguments, throws, options) ⇒ Function

Returns a new instance of Function.



431
432
433
434
435
436
437
# File 'lib/stark/raw_parser.rb', line 431

def initialize(name, return_type, arguments, throws, options)
  @name = name
  @return_type = return_type
  @arguments = arguments
  @throws = throws
  @options = options
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



440
441
442
# File 'lib/stark/raw_parser.rb', line 440

def arguments
  @arguments
end

#nameObject (readonly)

Returns the value of attribute name.



438
439
440
# File 'lib/stark/raw_parser.rb', line 438

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



442
443
444
# File 'lib/stark/raw_parser.rb', line 442

def options
  @options
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



439
440
441
# File 'lib/stark/raw_parser.rb', line 439

def return_type
  @return_type
end

#throwsObject (readonly)

Returns the value of attribute throws.



441
442
443
# File 'lib/stark/raw_parser.rb', line 441

def throws
  @throws
end

Instance Method Details

#accept(obj) ⇒ Object



30
31
32
# File 'lib/stark/ast.rb', line 30

def accept(obj)
  obj.process_function self
end