Class: Grant::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/grant/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#actionsObject (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_actionsObject



5
6
7
# File 'lib/grant/config.rb', line 5

def self.valid_actions
  @valid_actions ||= [:create, :find, :update, :destroy]
end