Class: Azeroth::Options Private
- Inherits:
-
Sinclair::Options
- Object
- Sinclair::Options
- 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.
-
#decorator ⇒ Decorator, ...
private
decorator class to be used.
-
#except ⇒ Array<String,Symbol>
private
actions to be ignored.
-
#only ⇒ Array<String,Symbol>
private
filter of only actions to be built.
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
24 25 26 |
# File 'lib/azeroth/options.rb', line 24 def actions [only].flatten.map(&:to_sym) - [except].flatten.map(&:to_sym) end |
#decorator ⇒ Decorator, ...
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.
decorator class to be used
when set as true/false, it either infer the class (model_class::Decorator) or do not use a decorator at all calling model.as_json
|
|
# File 'lib/azeroth/options.rb', line 42
|
#except ⇒ Array<String,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 ignored
|
|
# File 'lib/azeroth/options.rb', line 35
|
#only ⇒ Array<String,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.
filter of only actions to be built
|
|
# File 'lib/azeroth/options.rb', line 28
|