Class: Watirmark::Model::DefaultValues

Inherits:
Hash show all
Defined in:
lib/watirmark/models/default_values.rb

Instance Method Summary collapse

Methods inherited from Hash

#extract

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, &block) ⇒ Object



16
17
18
# File 'lib/watirmark/models/default_values.rb', line 16

def method_missing(name, &block)
  self[name] = block
end

Instance Method Details

#desc(&block) ⇒ Object

This works around an issue that gets hit when running from rake and the model has default.desc set. If we don’t have it here it thinks we’re trying to call rakes’ #desc



12
13
14
# File 'lib/watirmark/models/default_values.rb', line 12

def desc(&block)
  self[:desc] = block
end