Class: Datastore
- Inherits:
-
Object
- Object
- Datastore
- Defined in:
- lib/filentory/datastore.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
-
#mediatype ⇒ Object
Returns the value of attribute mediatype.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Datastore
constructor
A new instance of Datastore.
- #to_json ⇒ Object
Constructor Details
#initialize(name) ⇒ Datastore
Returns a new instance of Datastore.
6 7 8 9 |
# File 'lib/filentory/datastore.rb', line 6 def initialize(name) @name = name @files = Array.new end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
4 5 6 |
# File 'lib/filentory/datastore.rb', line 4 def files @files end |
#mediatype ⇒ Object
Returns the value of attribute mediatype.
4 5 6 |
# File 'lib/filentory/datastore.rb', line 4 def mediatype @mediatype end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/filentory/datastore.rb', line 4 def name @name end |
Instance Method Details
#to_json ⇒ Object
11 12 13 |
# File 'lib/filentory/datastore.rb', line 11 def to_json Oj::dump self, :indent => 2 end |