Class: Datastore

Inherits:
Object
  • Object
show all
Defined in:
lib/filentory/datastore.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filesObject

Returns the value of attribute files.



4
5
6
# File 'lib/filentory/datastore.rb', line 4

def files
  @files
end

#mediatypeObject

Returns the value of attribute mediatype.



4
5
6
# File 'lib/filentory/datastore.rb', line 4

def mediatype
  @mediatype
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/filentory/datastore.rb', line 4

def name
  @name
end

Instance Method Details

#to_jsonObject



11
12
13
# File 'lib/filentory/datastore.rb', line 11

def to_json
  Oj::dump self, :indent => 2
end