Class: Azeroth::Options Private

Inherits:
Sinclair::Options
  • Object
show all
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

See Also:

Author:

  • Darthjee

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

Instance Method Details

#actionsArray<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

Returns:

  • (Array<Symbol>)


24
25
26
# File 'lib/azeroth/options.rb', line 24

def actions
  [only].flatten.map(&:to_sym) - [except].flatten.map(&:to_sym)
end

#decoratorDecorator, ...

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

Returns:



# File 'lib/azeroth/options.rb', line 42

#exceptArray<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

Returns:

  • (Array<String,Symbol>)


# File 'lib/azeroth/options.rb', line 35

#onlyArray<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

Returns:

  • (Array<String,Symbol>)


# File 'lib/azeroth/options.rb', line 28