Class: Legalizer::Document
- Inherits:
-
Base
- Object
- Base
- Legalizer::Document
show all
- Defined in:
- lib/legalizer/document.rb
Instance Method Summary
collapse
Methods inherited from Base
#config, #connection, #contracts, #find, #templates, #token
Constructor Details
#initialize(options = {}) ⇒ Document
Returns a new instance of Document.
3
4
5
6
|
# File 'lib/legalizer/document.rb', line 3
def initialize(options={})
super(options)
@source = options[:object]
end
|
Instance Method Details
#id ⇒ Object
12
13
14
|
# File 'lib/legalizer/document.rb', line 12
def id
@source.documentKey
end
|
#source ⇒ Object
8
9
10
|
# File 'lib/legalizer/document.rb', line 8
def source
@source
end
|
#to_s ⇒ Object
16
17
18
|
# File 'lib/legalizer/document.rb', line 16
def to_s
@source.name
end
|
#to_struct ⇒ Object
20
21
22
|
# File 'lib/legalizer/document.rb', line 20
def to_struct
OpenStruct.new @source
end
|