Class: ROM::Options::Definitions Private

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

API:

  • private

Instance Method Summary collapse

Constructor Details

#initializeDefinitions

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.

API:

  • private



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.

API:

  • private



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.

API:

  • private



109
110
111
112
# File 'lib/rom/support/options.rb', line 109

def initialize_copy(source)
  super
  @options = @options.dup
end

#namesObject

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.

API:

  • private



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.

API:

  • private



118
119
120
121
# File 'lib/rom/support/options.rb', line 118

def process(object, options)
  ensure_known_options(options)
  each { |_, option| options.update option.transform(object, options) }
end