Class: Envdocs::Sampler

Inherits:
Object
  • Object
show all
Defined in:
lib/envdocs.rb

Overview

Retrieves keys for an environment from a sample template

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, curr_env) ⇒ Sampler

Returns a new instance of Sampler.

Parameters:

  • filename (String)
  • curr_env (String)


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_envObject (readonly)

Returns the value of attribute curr_env.



39
40
41
# File 'lib/envdocs.rb', line 39

def curr_env
  @curr_env
end

#env_keysObject (readonly)

Returns the value of attribute env_keys.



39
40
41
# File 'lib/envdocs.rb', line 39

def env_keys
  @env_keys
end

#filenameObject (readonly)

Returns the value of attribute filename.



39
40
41
# File 'lib/envdocs.rb', line 39

def filename
  @filename
end

#templateObject (readonly)

Returns the value of attribute template.



39
40
41
# File 'lib/envdocs.rb', line 39

def template
  @template
end