Class: Dashboards::Dashboard
- Inherits:
-
Object
- Object
- Dashboards::Dashboard
- Defined in:
- lib/dashboards/dsl/dashboard.rb
Instance Attribute Summary collapse
-
#boxes ⇒ Object
readonly
Returns the value of attribute boxes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Instance Method Summary collapse
- #box(name, &block) ⇒ Object
-
#initialize(name, options = {}) ⇒ Dashboard
constructor
A new instance of Dashboard.
Constructor Details
#initialize(name, options = {}) ⇒ Dashboard
Returns a new instance of Dashboard.
7 8 9 10 11 |
# File 'lib/dashboards/dsl/dashboard.rb', line 7 def initialize(name, = {}) @name = name @slug = [:slug] || name.parameterize @boxes = [] end |
Instance Attribute Details
#boxes ⇒ Object (readonly)
Returns the value of attribute boxes.
5 6 7 |
# File 'lib/dashboards/dsl/dashboard.rb', line 5 def boxes @boxes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/dashboards/dsl/dashboard.rb', line 5 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
5 6 7 |
# File 'lib/dashboards/dsl/dashboard.rb', line 5 def slug @slug end |