Class: Clowne::Utils::Options
- Inherits:
-
Object
- Object
- Clowne::Utils::Options
- Defined in:
- lib/clowne/utils/options.rb
Constant Summary collapse
- INTERNAL_KEYS =
%i[adapter traits clowne_only_actions mapping only].freeze
Instance Method Summary collapse
- #adapter ⇒ Object
-
#initialize(options) ⇒ Options
constructor
A new instance of Options.
- #mapper ⇒ Object
- #only ⇒ Object
- #params ⇒ Object
- #traits ⇒ Object
Constructor Details
#initialize(options) ⇒ Options
Returns a new instance of Options.
8 9 10 |
# File 'lib/clowne/utils/options.rb', line 8 def initialize() @options = end |
Instance Method Details
#adapter ⇒ Object
24 25 26 |
# File 'lib/clowne/utils/options.rb', line 24 def adapter [:adapter] end |
#mapper ⇒ Object
20 21 22 |
# File 'lib/clowne/utils/options.rb', line 20 def mapper [:mapper] end |
#only ⇒ Object
16 17 18 |
# File 'lib/clowne/utils/options.rb', line 16 def only [:clowne_only_actions] end |
#params ⇒ Object
28 29 30 31 32 |
# File 'lib/clowne/utils/options.rb', line 28 def params .dup.tap do |o| INTERNAL_KEYS.each { |key| o.delete(key) } end end |
#traits ⇒ Object
12 13 14 |
# File 'lib/clowne/utils/options.rb', line 12 def traits @_traits ||= Array([:traits]) end |