Class: Grant::Config
- Inherits:
-
Object
- Object
- Grant::Config
- Defined in:
- lib/grant/config.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(*args) ⇒ Config
Returns a new instance of Config.
9 10 11 12 |
# File 'lib/grant/config.rb', line 9 def initialize(*args) @actions = args.map(&:to_sym) validate_actions(@actions) end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
3 4 5 |
# File 'lib/grant/config.rb', line 3 def actions @actions end |
Class Method Details
.valid_actions ⇒ Object
5 6 7 |
# File 'lib/grant/config.rb', line 5 def self.valid_actions @valid_actions ||= [:create, :find, :update, :destroy] end |