Class: SimpleDocument::Ostruct

Inherits:
SimpleDocument show all
Extended by:
Forwardable
Defined in:
lib/simple_document/ostruct.rb

Direct Known Subclasses

FileStore::Document

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Ostruct

Returns a new instance of Ostruct.



7
8
9
# File 'lib/simple_document/ostruct.rb', line 7

def initialize(data)
  @ostruct = OpenStruct.new(data)
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/simple_document/ostruct.rb', line 13

def active?
  true
end

#mtimeObject



17
18
19
# File 'lib/simple_document/ostruct.rb', line 17

def mtime
  @ostruct.mtime && Time.parse(@ostruct.mtime)
end