Class: Girdle::Grid
- Inherits:
-
Object
- Object
- Girdle::Grid
- Defined in:
- lib/girdle/grid.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(id) ⇒ Grid
constructor
A new instance of Grid.
- #is_default? ⇒ Boolean
- #megahertz ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(id) ⇒ Grid
Returns a new instance of Grid.
7 8 9 |
# File 'lib/girdle/grid.rb', line 7 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/girdle/grid.rb', line 5 def id @id end |
Class Method Details
Instance Method Details
#attributes ⇒ Object
15 16 17 |
# File 'lib/girdle/grid.rb', line 15 def attributes Girdle.run(grid: 'attributes', gid: id)['gridAttributes'] end |
#is_default? ⇒ Boolean
27 28 29 |
# File 'lib/girdle/grid.rb', line 27 def is_default? attributes['isDefault'] == 'YES' end |
#megahertz ⇒ Object
23 24 25 |
# File 'lib/girdle/grid.rb', line 23 def megahertz attributes['gridMegahertz'] end |
#name ⇒ Object
19 20 21 |
# File 'lib/girdle/grid.rb', line 19 def name attributes['name'] end |