Class: Scram::DSL::Builders::ComparatorBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/scram/dsl/builders.rb

Overview

TODO: Flatten comparatorbuilder and conditionbuilder into one “DictionaryBuilder” Builder used to create comparators.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ComparatorBuilder


17
18
19
20
# File 'lib/scram/dsl/builders.rb', line 17

def initialize(&block)
  @comparators = {}
  super(&block)
end

Instance Attribute Details

#comparatorsObject

Returns the value of attribute comparators


15
16
17
# File 'lib/scram/dsl/builders.rb', line 15

def comparators
  @comparators
end

Instance Method Details

#comparator(name, &block) ⇒ Object


22
23
24
# File 'lib/scram/dsl/builders.rb', line 22

def comparator name, &block
  @comparators[name] = block
end