Class: SimpleDocument::Ostruct
- Inherits:
-
SimpleDocument
- Object
- SimpleDocument
- SimpleDocument::Ostruct
- Extended by:
- Forwardable
- Defined in:
- lib/simple_document/ostruct.rb
Direct Known Subclasses
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#initialize(data) ⇒ Ostruct
constructor
A new instance of Ostruct.
- #mtime ⇒ Object
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
13 14 15 |
# File 'lib/simple_document/ostruct.rb', line 13 def active? true end |
#mtime ⇒ Object
17 18 19 |
# File 'lib/simple_document/ostruct.rb', line 17 def mtime @ostruct.mtime && Time.parse(@ostruct.mtime) end |