Class: DeclarativePolicy::Base::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/declarative_policy/base.rb

Instance Method Summary collapse

Constructor Details

#initializeOptions

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_hObject



49
50
51
# File 'lib/declarative_policy/base.rb', line 49

def to_h
  @hash
end