Class: Girdle::Grid

Inherits:
Object
  • Object
show all
Defined in:
lib/girdle/grid.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/girdle/grid.rb', line 5

def id
  @id
end

Class Method Details

.listObject



11
12
13
# File 'lib/girdle/grid.rb', line 11

def self.list
  Girdle.run(grid: 'list')
end

Instance Method Details

#attributesObject



15
16
17
# File 'lib/girdle/grid.rb', line 15

def attributes
  Girdle.run(grid: 'attributes', gid: id)['gridAttributes']
end

#is_default?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/girdle/grid.rb', line 27

def is_default?
  attributes['isDefault'] == 'YES'
end

#megahertzObject



23
24
25
# File 'lib/girdle/grid.rb', line 23

def megahertz
  attributes['gridMegahertz']
end

#nameObject



19
20
21
# File 'lib/girdle/grid.rb', line 19

def name
  attributes['name']
end