Method: GDash#initialize
- Defined in:
- lib/gdash.rb
#initialize(graphite_base, render_url, dash_templates, options = {}) ⇒ GDash
Returns a new instance of GDash.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gdash.rb', line 15 def initialize(graphite_base, render_url, dash_templates, ={}) @graphite_base = graphite_base @graphite_render = [@graphite_base, "/render/"].join @dash_templates = dash_templates @height = .delete(:height) @width = .delete(:width) @from = .delete(:from) @until = .delete(:until) raise "Dashboard templates directory #{@dash_templates} does not exist" unless File.directory?(@dash_templates) end |