Class: SimplerDB::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/simplerdb/db.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Domain

Returns a new instance of Domain.



9
10
11
12
# File 'lib/simplerdb/db.rb', line 9

def initialize(name)
  @name = name
  @items = Hash.new { |hash, key| hash[key] = Item.new(key) }
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



7
8
9
# File 'lib/simplerdb/db.rb', line 7

def items
  @items
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/simplerdb/db.rb', line 7

def name
  @name
end