Class: Visage::Graph
- Inherits:
-
Object
- Object
- Visage::Graph
- Defined in:
- lib/visage-app/graph.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#instances ⇒ Object
Returns the value of attribute instances.
-
#plugin ⇒ Object
Returns the value of attribute plugin.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(opts = {}) ⇒ Graph
constructor
A new instance of Graph.
Constructor Details
#initialize(opts = {}) ⇒ Graph
Returns a new instance of Graph.
10 11 12 13 14 |
# File 'lib/visage-app/graph.rb', line 10 def initialize(opts={}) @host = opts[:host] @plugin = opts[:plugin] @instances = opts[:instances] end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/visage-app/graph.rb', line 8 def host @host end |
#instances ⇒ Object
Returns the value of attribute instances.
8 9 10 |
# File 'lib/visage-app/graph.rb', line 8 def instances @instances end |
#plugin ⇒ Object
Returns the value of attribute plugin.
8 9 10 |
# File 'lib/visage-app/graph.rb', line 8 def plugin @plugin end |
Instance Method Details
#id ⇒ Object
16 17 18 |
# File 'lib/visage-app/graph.rb', line 16 def id Digest::MD5.hexdigest("#{@host}-#{@plugin}-#{@instances}\n") end |