Class: EML::Config
Direct Known Subclasses
Instance Method Summary collapse
- #environment ⇒ Object
- #environment=(value) ⇒ Object
- #require(param) ⇒ Object
- #require_parameter(param) ⇒ Object
Instance Method Details
#environment ⇒ Object
9 10 11 |
# File 'lib/eml/config.rb', line 9 def environment EML::Environment end |
#environment=(value) ⇒ Object
14 15 16 |
# File 'lib/eml/config.rb', line 14 def environment=(value) EML::Environment.set(value) end |
#require(param) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/eml/config.rb', line 19 def require(param) value = public_send(param) return value unless value.nil? || value.empty? require_error(param) end |
#require_parameter(param) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/eml/config.rb', line 27 def require_parameter(param) require(param) rescue ArgumentError => e = e. + "\n" \ "Alternatively, you can pass dynamic values with your request " \ "parameters" raise ArgumentError, end |