Class: Lono::Inspector::Graph::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/lono/inspector/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Node

Returns a new instance of Node.



109
110
111
112
113
# File 'lib/lono/inspector/graph.rb', line 109

def initialize(name)
  @name = name
  @children = []
  @depends_on = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



108
109
110
# File 'lib/lono/inspector/graph.rb', line 108

def children
  @children
end

#depends_onObject

Returns the value of attribute depends_on.



108
109
110
# File 'lib/lono/inspector/graph.rb', line 108

def depends_on
  @depends_on
end

#nameObject

Returns the value of attribute name.



108
109
110
# File 'lib/lono/inspector/graph.rb', line 108

def name
  @name
end

#resource_typeObject

Returns the value of attribute resource_type.



108
109
110
# File 'lib/lono/inspector/graph.rb', line 108

def resource_type
  @resource_type
end

Instance Method Details

#graph_nameObject



115
116
117
118
# File 'lib/lono/inspector/graph.rb', line 115

def graph_name
  type = "(#{resource_type})" if resource_type
  [name, type].compact.join("\n")
end