Class: Milkode::DocumentRecord
- Inherits:
-
Object
- Object
- Milkode::DocumentRecord
- Defined in:
- lib/milkode/database/document_record.rb
Instance Attribute Summary collapse
-
#grnrcd ⇒ Object
Returns the value of attribute grnrcd.
Class Method Summary collapse
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(grnrcd) ⇒ DocumentRecord
constructor
A new instance of DocumentRecord.
- #inspect ⇒ Object
- #package ⇒ Object
- #path ⇒ Object
- #restpath ⇒ Object
-
#shortpath ⇒ Object
—.
- #suffix ⇒ Object
- #timestamp ⇒ Object
Constructor Details
#initialize(grnrcd) ⇒ DocumentRecord
Returns a new instance of DocumentRecord.
20 21 22 |
# File 'lib/milkode/database/document_record.rb', line 20 def initialize(grnrcd) @grnrcd = grnrcd end |
Instance Attribute Details
#grnrcd ⇒ Object
Returns the value of attribute grnrcd.
10 11 12 |
# File 'lib/milkode/database/document_record.rb', line 10 def grnrcd @grnrcd end |
Class Method Details
.create(grnrcd) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/milkode/database/document_record.rb', line 12 def self.create(grnrcd) if grnrcd DocumentRecord.new grnrcd else nil end end |
.shortpath(grnrcd) ⇒ Object
58 59 60 |
# File 'lib/milkode/database/document_record.rb', line 58 def self.shortpath(grnrcd) File.join grnrcd.package, grnrcd.restpath end |
Instance Method Details
#content ⇒ Object
36 37 38 |
# File 'lib/milkode/database/document_record.rb', line 36 def content @grnrcd.content end |
#inspect ⇒ Object
48 49 50 |
# File 'lib/milkode/database/document_record.rb', line 48 def inspect "#<Milkode::DocumentRecord:#{[@grnrcd.path, @grnrcd.package, @grnrcd.restpath, @grnrcd.content, @grnrcd., @grnrcd.suffix]}>" end |
#package ⇒ Object
28 29 30 |
# File 'lib/milkode/database/document_record.rb', line 28 def package @grnrcd.package end |
#path ⇒ Object
24 25 26 |
# File 'lib/milkode/database/document_record.rb', line 24 def path @grnrcd.path end |
#restpath ⇒ Object
32 33 34 |
# File 'lib/milkode/database/document_record.rb', line 32 def restpath @grnrcd.restpath end |
#shortpath ⇒ Object
54 55 56 |
# File 'lib/milkode/database/document_record.rb', line 54 def shortpath DocumentRecord.shortpath(@grnrcd) end |
#suffix ⇒ Object
44 45 46 |
# File 'lib/milkode/database/document_record.rb', line 44 def suffix @grnrcd.suffix end |
#timestamp ⇒ Object
40 41 42 |
# File 'lib/milkode/database/document_record.rb', line 40 def @grnrcd. end |