Class: Yard2steep::AST::MethodNode
- Inherits:
-
Object
- Object
- Yard2steep::AST::MethodNode
- Defined in:
- lib/yard2steep/ast/method_node.rb
Overview
MethodNode represents ‘method` AST.
Instance Attribute Summary collapse
-
#m_name ⇒ Object
readonly
Returns the value of attribute m_name.
-
#p_list ⇒ Object
readonly
Returns the value of attribute p_list.
-
#r_type ⇒ Object
readonly
Returns the value of attribute r_type.
Instance Method Summary collapse
-
#initialize(m_name:, p_list:, r_type:) ⇒ MethodNode
constructor
A new instance of MethodNode.
Constructor Details
#initialize(m_name:, p_list:, r_type:) ⇒ MethodNode
Returns a new instance of MethodNode.
11 12 13 14 15 16 17 18 |
# File 'lib/yard2steep/ast/method_node.rb', line 11 def initialize(m_name:, p_list:, r_type:) Util.assert! { m_name.is_a?(String) } Util.assert! { p_list.is_a?(Array) } Util.assert! { r_type.is_a?(String) } @p_list = p_list @r_type = r_type @m_name = m_name end |
Instance Attribute Details
#m_name ⇒ Object (readonly)
Returns the value of attribute m_name.
6 7 8 |
# File 'lib/yard2steep/ast/method_node.rb', line 6 def m_name @m_name end |
#p_list ⇒ Object (readonly)
Returns the value of attribute p_list.
6 7 8 |
# File 'lib/yard2steep/ast/method_node.rb', line 6 def p_list @p_list end |
#r_type ⇒ Object (readonly)
Returns the value of attribute r_type.
6 7 8 |
# File 'lib/yard2steep/ast/method_node.rb', line 6 def r_type @r_type end |