Module: Textoken::OptionFactory

Defined in:
lib/textoken/factories/option_factory.rb

Overview

This factory created option objects throug user input option User input option like ‘more_than: 3’ (more_than) gets camelized and objects get initialized with error handling

Class Method Summary collapse

Class Method Details

.build(key, value) ⇒ Object



6
7
8
# File 'lib/textoken/factories/option_factory.rb', line 6

def self.build(key, value)
  option_klass(key).new(value)
end