Class: Riml::DefMethodNode

Inherits:
DefNode
  • Object
show all
Defined in:
lib/nodes.rb

Constant Summary

Constants inherited from DefNode

Riml::DefNode::DEFAULT_PARAMS, Riml::DefNode::SPLAT

Constants included from Visitable

Visitable::DESCENDANT_OF_REGEX

Instance Attribute Summary

Attributes inherited from DefNode

#bang, #expressions, #keywords, #name, #original_name, #parameters, #private_function, #scope_modifier, #sid

Attributes included from Visitable

#compiled_output, #force_newline, #parent_node, #scope

Instance Method Summary collapse

Methods inherited from DefNode

#argument_variable_names, #autoload?, #children, #default_param_nodes, #defined_on_dictionary?, #initialize, #method_missing, #nested_function?, #nested_within, #shadowed_argument?, #shadowed_argument_variable_names, #splat, #super_node, #to_scope

Methods included from Walkable

#child_after, #child_previous_to, #each, #index_by_children, #index_by_member, #insert_after, #insert_before, #next, #previous, #remove, #replace_with

Methods included from FullyNameable

#full_name, included

Methods included from Indentable

#indent, #indented?, #outdent

Methods included from Visitable

#accept, #method_missing, #respond_to?

Constructor Details

This class inherits a constructor from Riml::DefNode

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Riml::DefNode

Instance Method Details

#to_def_nodeObject



748
749
750
751
752
# File 'lib/nodes.rb', line 748

def to_def_node
  def_node = DefNode.new(bang, sid, 's:', name, parameters, ['dict'], expressions)
  def_node.parent = parent
  def_node
end