Class: Imagen::Node::Class

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

Overview

Represents a Ruby class

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



131
132
133
134
# File 'lib/imagen/node.rb', line 131

def build_from_ast(ast_node)
  super
  tap { @name = ast_node.children[0].children[1].to_s }
end

#human_nameObject



136
137
138
# File 'lib/imagen/node.rb', line 136

def human_name
  'class'
end