Class: Auditor::Config
- Inherits:
-
Object
- Object
- Auditor::Config
- Defined in:
- lib/auditor/config.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
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.
10 11 12 13 14 15 16 |
# File 'lib/auditor/config.rb', line 10 def initialize(*args) @options = (args.pop if args.last.kind_of?(Hash)) || {} (@options) @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/auditor/config.rb', line 3 def actions @actions end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/auditor/config.rb', line 4 def @options end |
Class Method Details
.valid_actions ⇒ Object
6 7 8 |
# File 'lib/auditor/config.rb', line 6 def self.valid_actions @valid_actions ||= [:create, :find, :update, :destroy] end |