Class: Datalab::OcrOptions
- Inherits:
-
Object
- Object
- Datalab::OcrOptions
- Includes:
- DynamicSchema::Definable
- Defined in:
- lib/datalab/ocr_options.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}, api_options: nil) ⇒ OcrOptions
constructor
A new instance of OcrOptions.
- #to_h ⇒ Object
Constructor Details
#initialize(options = {}, api_options: nil) ⇒ OcrOptions
Returns a new instance of OcrOptions.
18 19 20 21 |
# File 'lib/datalab/ocr_options.rb', line 18 def initialize( = {}, api_options: nil ) @options = self.class.builder.build( || {} ) @options = .merge( @options ) if end |
Class Method Details
.build(options = nil, &block) ⇒ Object
10 11 12 |
# File 'lib/datalab/ocr_options.rb', line 10 def self.build( = nil, &block ) new( api_options: builder.build( , &block ) ) end |
.build!(options = nil, &block) ⇒ Object
14 15 16 |
# File 'lib/datalab/ocr_options.rb', line 14 def self.build!( = nil, &block ) new( api_options: builder.build!( , &block ) ) end |
Instance Method Details
#to_h ⇒ Object
23 24 25 |
# File 'lib/datalab/ocr_options.rb', line 23 def to_h @options.to_h end |