Class: SimplerDB::Domain
- Inherits:
-
Object
- Object
- SimplerDB::Domain
- Defined in:
- lib/simplerdb/db.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Domain
constructor
A new instance of Domain.
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
#items ⇒ Object
Returns the value of attribute items.
7 8 9 |
# File 'lib/simplerdb/db.rb', line 7 def items @items end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/simplerdb/db.rb', line 7 def name @name end |