Class: Vdb::Config
- Inherits:
-
Object
- Object
- Vdb::Config
- Defined in:
- lib/vdb/config.rb
Overview
Configuration for the vdb engine.
Instance Attribute Summary collapse
-
#databases ⇒ Object
Hash of label => Pathname/String path to the schema.rb file.
-
#password ⇒ Object
HTTP Basic Auth credentials.
-
#title ⇒ Object
Page title shown in the browser tab and header.
-
#username ⇒ Object
HTTP Basic Auth credentials.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
32 33 34 35 36 37 |
# File 'lib/vdb/config.rb', line 32 def initialize @username = nil @password = nil @databases = { 'primary' => nil } # nil = auto-resolve at request time @title = 'Database ERD' end |
Instance Attribute Details
#databases ⇒ Object
Hash of label => Pathname/String path to the schema.rb file. Each entry becomes a tab in the ERD UI. Defaults to the host app’s primary schema.
27 28 29 |
# File 'lib/vdb/config.rb', line 27 def databases @databases end |
#password ⇒ Object
HTTP Basic Auth credentials. Leave nil to disable auth entirely.
22 23 24 |
# File 'lib/vdb/config.rb', line 22 def password @password end |
#title ⇒ Object
Page title shown in the browser tab and header.
30 31 32 |
# File 'lib/vdb/config.rb', line 30 def title @title end |
#username ⇒ Object
HTTP Basic Auth credentials. Leave nil to disable auth entirely.
22 23 24 |
# File 'lib/vdb/config.rb', line 22 def username @username end |