Class: DeclarativePolicy::Base::Options
- Inherits:
-
Object
- Object
- DeclarativePolicy::Base::Options
- Defined in:
- lib/declarative_policy/base.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
37 38 39 |
# File 'lib/declarative_policy/base.rb', line 37 def initialize @hash = {} end |
Instance Method Details
#[](key) ⇒ Object
45 46 47 |
# File 'lib/declarative_policy/base.rb', line 45 def [](key) @hash[key.to_sym] end |
#[]=(key, value) ⇒ Object
41 42 43 |
# File 'lib/declarative_policy/base.rb', line 41 def []=(key, value) @hash[key.to_sym] = value end |
#to_h ⇒ Object
49 50 51 |
# File 'lib/declarative_policy/base.rb', line 49 def to_h @hash end |