Class: Phenotype::HeaderStrategy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#envObject (readonly)

Returns the value of attribute env.



3
4
5
# File 'lib/strategies/header_strategy.rb', line 3

def env
  @env
end

#headerObject (readonly)

Returns the value of attribute header.



3
4
5
# File 'lib/strategies/header_strategy.rb', line 3

def header
  @header
end

#header_paramObject (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

#versionObject



13
14
15
# File 'lib/strategies/header_strategy.rb', line 13

def version
  @version = env[header_key]
end