Class: Mindee::WorkflowOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/client.rb

Overview

Class for configuration options in workflow executions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params: {}) ⇒ WorkflowOptions

Returns a new instance of WorkflowOptions.



93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mindee/client.rb', line 93

def initialize(params: {})
  params = params.transform_keys(&:to_sym)
  @document_alias = params.fetch(:document_alias, nil)
  @priority = params.fetch(:priority, nil)
  @full_text = params.fetch(:full_text, false)
  @public_url = params.fetch(:public_url, nil)
  @rag = params.fetch(:rag, nil)
  raw_page_options = params.fetch(:page_options, nil)
  raw_page_options = PageOptions.new(params: raw_page_options) unless raw_page_options.is_a?(PageOptions)
  @page_options = raw_page_options
end

Instance Attribute Details

#document_aliasObject

Alias to give to the document.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/mindee/client.rb', line 90

class WorkflowOptions
  attr_accessor :document_alias, :priority, :full_text, :public_url, :page_options, :rag

  def initialize(params: {})
    params = params.transform_keys(&:to_sym)
    @document_alias = params.fetch(:document_alias, nil)
    @priority = params.fetch(:priority, nil)
    @full_text = params.fetch(:full_text, false)
    @public_url = params.fetch(:public_url, nil)
    @rag = params.fetch(:rag, nil)
    raw_page_options = params.fetch(:page_options, nil)
    raw_page_options = PageOptions.new(params: raw_page_options) unless raw_page_options.is_a?(PageOptions)
    @page_options = raw_page_options
  end
end

#full_textObject

Returns the value of attribute full_text.



91
92
93
# File 'lib/mindee/client.rb', line 91

def full_text
  @full_text
end

#page_optionsObject

Returns the value of attribute page_options.



91
92
93
# File 'lib/mindee/client.rb', line 91

def page_options
  @page_options
end

#priorityObject

Returns the value of attribute priority.



91
92
93
# File 'lib/mindee/client.rb', line 91

def priority
  @priority
end

#public_urlObject

A unique, encrypted URL for accessing the document validation interface without requiring authentication.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/mindee/client.rb', line 90

class WorkflowOptions
  attr_accessor :document_alias, :priority, :full_text, :public_url, :page_options, :rag

  def initialize(params: {})
    params = params.transform_keys(&:to_sym)
    @document_alias = params.fetch(:document_alias, nil)
    @priority = params.fetch(:priority, nil)
    @full_text = params.fetch(:full_text, false)
    @public_url = params.fetch(:public_url, nil)
    @rag = params.fetch(:rag, nil)
    raw_page_options = params.fetch(:page_options, nil)
    raw_page_options = PageOptions.new(params: raw_page_options) unless raw_page_options.is_a?(PageOptions)
    @page_options = raw_page_options
  end
end

#ragObject

Returns the value of attribute rag.



91
92
93
# File 'lib/mindee/client.rb', line 91

def rag
  @rag
end