Class: Refract::ParametersNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/parameters_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept, #copy, #start_line, #type, type

Constructor Details

#initialize(prism_node: nil, requireds:, optionals:, rest:, posts:, keywords:, keyword_rest:, block:) ⇒ ParametersNode

Returns a new instance of ParametersNode.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/refract/nodes/parameters_node.rb', line 5

def initialize(prism_node: nil, requireds:, optionals:, rest:, posts:, keywords:, keyword_rest:, block:)
	@prism_node = prism_node => Prism::Node | nil
	@requireds = requireds
	@optionals = optionals
	@rest = rest
	@posts = posts
	@keywords = keywords
	@keyword_rest = keyword_rest
	@block = block
	freeze
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def block
  @block
end

#keyword_restObject

Returns the value of attribute keyword_rest.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def keyword_rest
  @keyword_rest
end

#keywordsObject

Returns the value of attribute keywords.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def keywords
  @keywords
end

#optionalsObject

Returns the value of attribute optionals.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def optionals
  @optionals
end

#postsObject

Returns the value of attribute posts.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def posts
  @posts
end

#requiredsObject

Returns the value of attribute requireds.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def requireds
  @requireds
end

#restObject

Returns the value of attribute rest.



17
18
19
# File 'lib/refract/nodes/parameters_node.rb', line 17

def rest
  @rest
end