Method: MSpecScript.get
- Defined in:
- lib/mspec/utils/script.rb
.get(key) ⇒ Object
Gets the value of key from the config object. Simplifies getting values in a config file:
class MSpecScript
set :a, 1
set :b, 2
set :c, get(:a) + get(:b)
end
36 37 38 |
# File 'lib/mspec/utils/script.rb', line 36 def self.get(key) config[key] end |