Module: Bubbler

Defined in:
lib/bubbler.rb,
lib/bubbler/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.create_html_file(args) ⇒ Object



7
8
9
# File 'lib/bubbler.rb', line 7

def self.create_html_file args
  File.write("index.html", html(args))
end

.html(args) ⇒ Object



11
12
13
14
# File 'lib/bubbler.rb', line 11

def self.html args
  graphs = graphs_from_config(args[:config])
  Page.html(graphs: graphs, file: "index.html", template: args[:template])
end

.json(args) ⇒ Object



16
17
18
# File 'lib/bubbler.rb', line 16

def self.json args
  graphs_from_config(args[:config]).to_json
end