Class: Imagen::Node::Block

Inherits:
Base
  • Object
show all
Defined in:
lib/imagen/node.rb

Overview

Represents a Ruby block

Instance Attribute Summary

Attributes inherited from Base

#ast_node, #children, #name

Instance Method Summary collapse

Methods inherited from Base

#file_path, #find_all, #first_line, #initialize, #last_line, #line_numbers, #source, #source_lines, #source_lines_with_numbers

Constructor Details

This class inherits a constructor from Imagen::Node::Base

Instance Method Details

#build_from_ast(_ast_node) ⇒ Object



168
169
170
171
# File 'lib/imagen/node.rb', line 168

def build_from_ast(_ast_node)
  super
  tap { @name = ['block', args_list].compact.join(' ') }
end

#human_nameObject



173
174
175
# File 'lib/imagen/node.rb', line 173

def human_name
  'block'
end