Class: ResponseMate::Environment
- Inherits:
-
Object
- Object
- ResponseMate::Environment
- Defined in:
- lib/response_mate/environment.rb
Overview
Responsible for parsing the environment file The environment file (by default found as environment.yml in a project) is a Hash which will be used for the rendering of the requests manifest as a [Mustace template](mustache.github.io/mustache.5.html).
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#environment_text ⇒ Object
Returns the value of attribute environment_text.
-
#filename ⇒ Object
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize(filename) ⇒ Environment
Returns a new instance of Environment.
10 11 12 13 14 |
# File 'lib/response_mate/environment.rb', line 10 def initialize(filename) @filename = filename || ResponseMate.configuration.environment @env = {} parse end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
6 7 8 |
# File 'lib/response_mate/environment.rb', line 6 def env @env end |
#environment_text ⇒ Object
Returns the value of attribute environment_text.
6 7 8 |
# File 'lib/response_mate/environment.rb', line 6 def environment_text @environment_text end |
#filename ⇒ Object
Returns the value of attribute filename.
6 7 8 |
# File 'lib/response_mate/environment.rb', line 6 def filename @filename end |