Class: YDB::Database
- Inherits:
-
Object
- Object
- YDB::Database
- Defined in:
- lib/yaml-file-db/database.rb
Constant Summary collapse
- INTERNAL_VARS =
%i[@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.
9 10 11 12 13 |
# File 'lib/yaml-file-db/database.rb', line 9 def initialize(source, schemas) @errors = [] @schemas = schemas @source = source end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/yaml-file-db/database.rb', line 7 def errors @errors end |
#schemas ⇒ Object (readonly)
Returns the value of attribute schemas.
7 8 9 |
# File 'lib/yaml-file-db/database.rb', line 7 def schemas @schemas end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/yaml-file-db/database.rb', line 7 def source @source end |
Instance Method Details
#build ⇒ Object
15 16 17 18 19 20 |
# File 'lib/yaml-file-db/database.rb', line 15 def build build_tables build_relationships check_relationships self end |