Class: ResponseMate::Environment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ 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

#envObject

Returns the value of attribute env


6
7
8
# File 'lib/response_mate/environment.rb', line 6

def env
  @env
end

#environment_textObject

Returns the value of attribute environment_text


6
7
8
# File 'lib/response_mate/environment.rb', line 6

def environment_text
  @environment_text
end

#filenameObject

Returns the value of attribute filename


6
7
8
# File 'lib/response_mate/environment.rb', line 6

def filename
  @filename
end