Module: ROM::Options::ClassMethods Private
- Defined in:
- lib/rom/support/options.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#option_definitions ⇒ Definitions
private
Available options.
Instance Method Summary collapse
- #inherited(descendant) ⇒ Object private
-
#option(name, settings = {}) ⇒ Object
Defines an option.
Instance Attribute Details
#option_definitions ⇒ 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.
Available options
149 150 151 |
# File 'lib/rom/support/options.rb', line 149 def option_definitions @option_definitions end |
Instance Method Details
#inherited(descendant) ⇒ 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.
170 171 172 173 |
# File 'lib/rom/support/options.rb', line 170 def inherited(descendant) descendant.option_definitions = option_definitions.dup super end |
#option(name, settings = {}) ⇒ Object
Defines an option
163 164 165 166 167 |
# File 'lib/rom/support/options.rb', line 163 def option(name, settings = {}) option = Option.new(name, settings) option_definitions.define(option) attr_reader(name) if option.reader end |