Class: Phenotype::HeaderStrategy
- Inherits:
-
Object
- Object
- Phenotype::HeaderStrategy
- Defined in:
- lib/strategies/header_strategy.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#header_param ⇒ Object
readonly
Returns the value of attribute header_param.
Instance Method Summary collapse
- #get_version(env) ⇒ Object
-
#initialize(header: 'Sue') ⇒ HeaderStrategy
constructor
A new instance of HeaderStrategy.
- #version ⇒ Object
Constructor Details
#initialize(header: 'Sue') ⇒ HeaderStrategy
Returns a new instance of HeaderStrategy.
4 5 6 |
# File 'lib/strategies/header_strategy.rb', line 4 def initialize(header: 'Sue') @header = header end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
3 4 5 |
# File 'lib/strategies/header_strategy.rb', line 3 def env @env end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/strategies/header_strategy.rb', line 3 def header @header end |
#header_param ⇒ Object (readonly)
Returns the value of attribute header_param.
3 4 5 |
# File 'lib/strategies/header_strategy.rb', line 3 def header_param @header_param end |
Instance Method Details
#get_version(env) ⇒ Object
8 9 10 11 |
# File 'lib/strategies/header_strategy.rb', line 8 def get_version(env) @env = env version end |
#version ⇒ Object
13 14 15 |
# File 'lib/strategies/header_strategy.rb', line 13 def version @version = env[header_key] end |