Class: Lateral::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/lateral/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Document



5
6
7
8
9
10
# File 'lib/lateral/document.rb', line 5

def initialize(args)
  @id         = args.fetch 'document_id'
  @created_at = args.fetch 'created_at'
  @text       = args.fetch 'text'
  @meta       = args.fetch 'meta', {}
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



3
4
5
# File 'lib/lateral/document.rb', line 3

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/lateral/document.rb', line 3

def id
  @id
end

#metaObject (readonly)

Returns the value of attribute meta.



3
4
5
# File 'lib/lateral/document.rb', line 3

def meta
  @meta
end

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/lateral/document.rb', line 3

def text
  @text
end