Class: ROM::Options::Definitions Private
- Inherits:
-
Object
- Object
- ROM::Options::Definitions
- Defined in:
- lib/rom/support/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.
Manage all available options
Instance Method Summary collapse
- #define(option) ⇒ Object private
-
#initialize ⇒ Definitions
constructor
private
A new instance of Definitions.
- #initialize_copy(source) ⇒ Object private
- #names ⇒ Object private
- #process(object, options) ⇒ Object private
Constructor Details
#initialize ⇒ Definitions
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 Definitions.
105 106 107 |
# File 'lib/rom/support/options.rb', line 105 def initialize @options = {} end |
Instance Method Details
#define(option) ⇒ Object
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.
114 115 116 |
# File 'lib/rom/support/options.rb', line 114 def define(option) @options[option.name] = option end |
#initialize_copy(source) ⇒ Object
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.
109 110 111 112 |
# File 'lib/rom/support/options.rb', line 109 def initialize_copy(source) super @options = @options.dup end |
#names ⇒ Object
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.
123 124 125 |
# File 'lib/rom/support/options.rb', line 123 def names @options.keys end |
#process(object, options) ⇒ Object
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.
118 119 120 121 |
# File 'lib/rom/support/options.rb', line 118 def process(object, ) () each { |_, option| .update option.transform(object, ) } end |