Class: RackFlags::CookieCodec::Parser
- Inherits:
-
Object
- Object
- RackFlags::CookieCodec::Parser
- Defined in:
- lib/rack-flags/cookie_codec.rb
Instance Attribute Summary collapse
-
#overrides ⇒ Object
readonly
Returns the value of attribute overrides.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(raw_overrides) ⇒ Object
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
15 16 17 |
# File 'lib/rack-flags/cookie_codec.rb', line 15 def initialize() @overrides = {} end |
Instance Attribute Details
#overrides ⇒ Object (readonly)
Returns the value of attribute overrides.
7 8 9 |
# File 'lib/rack-flags/cookie_codec.rb', line 7 def overrides @overrides end |
Class Method Details
.parse(cookie_value) ⇒ Object
9 10 11 12 13 |
# File 'lib/rack-flags/cookie_codec.rb', line 9 def self.parse() parser = new parser.parse() parser.overrides end |
Instance Method Details
#parse(raw_overrides) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/rack-flags/cookie_codec.rb', line 19 def parse(raw_overrides) return if raw_overrides.nil? raw_overrides.split(' ').each do |override| parse_override(override) end end |