Class: Page
- Inherits:
-
Mustache
- Object
- Mustache
- Page
- Defined in:
- lib/bubbler/page.rb
Instance Attribute Summary collapse
-
#graphs ⇒ Object
readonly
Returns the value of attribute graphs.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(args) ⇒ Page
Returns a new instance of Page.
7 8 9 10 |
# File 'lib/bubbler/page.rb', line 7 def initialize args @names = graph_names(args[:graphs]) @graphs = graph_data(args[:graphs]) end |
Instance Attribute Details
#graphs ⇒ Object (readonly)
Returns the value of attribute graphs.
5 6 7 |
# File 'lib/bubbler/page.rb', line 5 def graphs @graphs end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
5 6 7 |
# File 'lib/bubbler/page.rb', line 5 def names @names end |
Class Method Details
.html(args) ⇒ Object
12 13 14 15 16 |
# File 'lib/bubbler/page.rb', line 12 def self.html args page = new(args) page.template = find_template(args.fetch(:template, "default")) page.render end |