Class: Goat::Static

Inherits:
Object show all
Defined in:
lib/goat/static.rb

Class Method Summary collapse

Class Method Details

.press=(h) ⇒ Object



10
11
12
13
# File 'lib/goat/static.rb', line 10

def press=(h)        
  @press = YAML.load_file(h[:file])
  @rsrc = h[:resource]
end

.press_enabled?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/goat/static.rb', line 6

def press_enabled?
  not @press.nil?
end

.press_resourceObject



19
20
21
# File 'lib/goat/static.rb', line 19

def press_resource
  @rsrc
end

.pressed?(c) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/goat/static.rb', line 15

def pressed?(c)
  @press[:classes].include?(c.to_s)
end