Class: Envdocs::Sampler
- Inherits:
-
Object
- Object
- Envdocs::Sampler
- Defined in:
- lib/envdocs.rb
Overview
Retrieves keys for an environment from a sample template
Instance Attribute Summary collapse
-
#curr_env ⇒ Object
readonly
Returns the value of attribute curr_env.
-
#env_keys ⇒ Object
readonly
Returns the value of attribute env_keys.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(filename, curr_env) ⇒ Sampler
constructor
A new instance of Sampler.
Constructor Details
#initialize(filename, curr_env) ⇒ Sampler
Returns a new instance of Sampler.
43 44 45 46 47 48 |
# File 'lib/envdocs.rb', line 43 def initialize(filename, curr_env) @filename = filename @curr_env = curr_env @template = retrieve_keys_template(filename) @env_keys = retrieve_keys_for_env_from_template(curr_env) end |
Instance Attribute Details
#curr_env ⇒ Object (readonly)
Returns the value of attribute curr_env.
39 40 41 |
# File 'lib/envdocs.rb', line 39 def curr_env @curr_env end |
#env_keys ⇒ Object (readonly)
Returns the value of attribute env_keys.
39 40 41 |
# File 'lib/envdocs.rb', line 39 def env_keys @env_keys end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
39 40 41 |
# File 'lib/envdocs.rb', line 39 def filename @filename end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
39 40 41 |
# File 'lib/envdocs.rb', line 39 def template @template end |