Class: Visage::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/visage-app/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hostObject

Returns the value of attribute host.



8
9
10
# File 'lib/visage-app/graph.rb', line 8

def host
  @host
end

#instancesObject

Returns the value of attribute instances.



8
9
10
# File 'lib/visage-app/graph.rb', line 8

def instances
  @instances
end

#pluginObject

Returns the value of attribute plugin.



8
9
10
# File 'lib/visage-app/graph.rb', line 8

def plugin
  @plugin
end

Instance Method Details

#idObject



16
17
18
# File 'lib/visage-app/graph.rb', line 16

def id
  Digest::MD5.hexdigest("#{@host}-#{@plugin}-#{@instances}\n")
end