Class: MediaTypes::Scheme::EnumerationContext
- Inherits:
-
Object
- Object
- MediaTypes::Scheme::EnumerationContext
- Defined in:
- lib/media_types/scheme/enumeration_context.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#rules ⇒ Object
Returns the value of attribute rules.
Instance Method Summary collapse
- #enumerate(val) ⇒ Object
-
#initialize(rules:) ⇒ EnumerationContext
constructor
A new instance of EnumerationContext.
Constructor Details
#initialize(rules:) ⇒ EnumerationContext
Returns a new instance of EnumerationContext.
6 7 8 |
# File 'lib/media_types/scheme/enumeration_context.rb', line 6 def initialize(rules:) self.rules = rules end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
15 16 17 |
# File 'lib/media_types/scheme/enumeration_context.rb', line 15 def key @key end |
#rules ⇒ Object
Returns the value of attribute rules.
15 16 17 |
# File 'lib/media_types/scheme/enumeration_context.rb', line 15 def rules @rules end |
Instance Method Details
#enumerate(val) ⇒ Object
10 11 12 13 |
# File 'lib/media_types/scheme/enumeration_context.rb', line 10 def enumerate(val) self.key = val self end |