Class: Visage::Types

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Types

Returns a new instance of Types.



7
8
9
10
11
# File 'lib/visage-app/types.rb', line 7

def initialize(opts={})
  @filename = opts[:filename] || "/usr/share/collectd/types.db"
  @types    = []
  build
end

Instance Attribute Details

#typesObject (readonly)

Returns the value of attribute types.



5
6
7
# File 'lib/visage-app/types.rb', line 5

def types
  @types
end

Instance Method Details

#to_jsonObject



13
14
15
# File 'lib/visage-app/types.rb', line 13

def to_json
  @types.to_json
end