Class: Azeroth::Options Private
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Azeroth::Options
- Defined in:
- lib/azeroth/options.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Resource buiilding options
Constant Summary collapse
- DEFAULT_OPTIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Default options
{ only: i[create destroy edit index new show update], except: [], decorator: true }.freeze
Instance Method Summary collapse
-
#actions ⇒ Array<Symbol>
private
Actions to be built.
-
#initialize(options = {}) ⇒ Options
constructor
private
A new instance of Options.
Constructor Details
#initialize(options = {}) ⇒ Options
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Options.
23 24 25 26 27 |
# File 'lib/azeroth/options.rb', line 23 def initialize( = {}) () super(DEFAULT_OPTIONS.merge()) end |
Instance Method Details
#actions ⇒ Array<Symbol>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Actions to be built
32 33 34 |
# File 'lib/azeroth/options.rb', line 32 def actions [only].flatten.map(&:to_sym) - [except].flatten.map(&:to_sym) end |