Class: YDB::Database
- Inherits:
-
Object
- Object
- YDB::Database
- Defined in:
- lib/yaml-file-db/database.rb
Constant Summary collapse
- INTERNAL_VARS =
[:@errors, :@schemas, :@source].freeze
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#schemas ⇒ Object
readonly
Returns the value of attribute schemas.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(source, schemas) ⇒ Database
constructor
A new instance of Database.
Constructor Details
#initialize(source, schemas) ⇒ Database
Returns a new instance of Database.
8 9 10 11 12 |
# File 'lib/yaml-file-db/database.rb', line 8 def initialize(source, schemas) @errors = [] @schemas = schemas @source = source end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/yaml-file-db/database.rb', line 6 def errors @errors end |
#schemas ⇒ Object (readonly)
Returns the value of attribute schemas.
6 7 8 |
# File 'lib/yaml-file-db/database.rb', line 6 def schemas @schemas end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/yaml-file-db/database.rb', line 6 def source @source end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 |
# File 'lib/yaml-file-db/database.rb', line 14 def build() build_tables() build_relationships() check_relationships() self end |