Class: AbstractMapper::Settings Private

Inherits:
Object
  • Object
show all
Defined in:
lib/abstract_mapper/settings.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.

The configurable container of domain-specific DSL commands and rules along with corresponding AST builder and optimizer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#builderClass (readonly)

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 The builder class with domain-specific commands.

Returns:

  • (Class)

    The builder class with domain-specific commands



37
38
39
# File 'lib/abstract_mapper/settings.rb', line 37

def builder
  @builder
end

#commandsAbstractMapper::Commands (readonly)

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 The collection of registered DSL commands.

Returns:



17
18
19
# File 'lib/abstract_mapper/settings.rb', line 17

def commands
  @commands
end

#optimizerAbstractMapper::Optimizer (readonly)

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 The optimizer with domain-specific rules.

Returns:



31
32
33
# File 'lib/abstract_mapper/settings.rb', line 31

def optimizer
  @optimizer
end

#rulesAbstractMapper::Rules (readonly)

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 The collection of registered optimization rules.

Returns:



24
25
26
# File 'lib/abstract_mapper/settings.rb', line 24

def rules
  @rules
end

Class Method Details

.initialize(&block) ⇒ 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.



49
50
51
52
53
54
55
56
# File 'lib/abstract_mapper/settings.rb', line 49

def initialize(&block)
  __set_rules__
  __set_commands__
  __configure__(&block)
  __set_builder__
  __set_optimizer__
  freeze
end

.new(&block) ⇒ AbstractMapper::Settings

Creates a domain-specific settings with commands and rules initialized from inside a block

Parameters:

  • block (Proc)

Returns:



# File 'lib/abstract_mapper/settings.rb', line 39