Class: Visage::Types
- Inherits:
-
Object
- Object
- Visage::Types
- Defined in:
- lib/visage-app/types.rb
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Types
constructor
A new instance of Types.
- #to_json ⇒ Object
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
#types ⇒ Object (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_json ⇒ Object
13 14 15 |
# File 'lib/visage-app/types.rb', line 13 def to_json @types.to_json end |