Class: Retab::BlockExecFileHandleInput

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_block_executions/block_exec_file_handle_input.rb

Constant Summary collapse

HASH_ATTRS =
{
  document: :document,
  type: :type
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ BlockExecFileHandleInput

Returns a new instance of BlockExecFileHandleInput.



18
19
20
21
22
23
# File 'lib/retab/workflow_block_executions/block_exec_file_handle_input.rb', line 18

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @document = hash[:document] ? Retab::BlockExecFileRef.new(hash[:document]) : nil
  @type = hash[:type].nil? ? "file" : hash[:type]
end

Instance Attribute Details

#documentObject

Returns the value of attribute document.



13
14
15
# File 'lib/retab/workflow_block_executions/block_exec_file_handle_input.rb', line 13

def document
  @document
end

#typeObject

Returns the value of attribute type.



13
14
15
# File 'lib/retab/workflow_block_executions/block_exec_file_handle_input.rb', line 13

def type
  @type
end