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.



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

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

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



112
113
114
# File 'lib/lono/inspector/graph.rb', line 112

def children
  @children
end

#depends_onObject

Returns the value of attribute depends_on.



112
113
114
# File 'lib/lono/inspector/graph.rb', line 112

def depends_on
  @depends_on
end

#nameObject

Returns the value of attribute name.



112
113
114
# File 'lib/lono/inspector/graph.rb', line 112

def name
  @name
end

#resource_typeObject

Returns the value of attribute resource_type.



112
113
114
# File 'lib/lono/inspector/graph.rb', line 112

def resource_type
  @resource_type
end

Instance Method Details

#graph_nameObject



119
120
121
122
# File 'lib/lono/inspector/graph.rb', line 119

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