Class: Yoda::Model::NodeSignatures::Node

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/model/node_signatures/node.rb

Instance Attribute Summary

Attributes inherited from Base

#node_info

Instance Method Summary collapse

Methods inherited from Base

#initialize, #node_range, #node_type_description, #type_descriptions

Constructor Details

This class inherits a constructor from Yoda::Model::NodeSignatures::Base

Instance Method Details

#defined_filesObject



13
14
15
# File 'lib/yoda/model/node_signatures/node.rb', line 13

def defined_files
  node_info.require_paths.map { |path| [path, Parsing::Location.first_row, Parsing::Location.first_column] }
end

#descriptionsObject



5
6
7
8
9
10
11
# File 'lib/yoda/model/node_signatures/node.rb', line 5

def descriptions
  if node_info.require_paths.empty?
    [node_type_description, *type_descriptions]
  else
    node_info.require_paths.map { |path| Descriptions::RequirePathDescription.new(path) }
  end
end