Class: JSONdb::Constants
- Inherits:
-
Object
- Object
- JSONdb::Constants
- Defined in:
- lib/jsondb/constants.rb
Instance Attribute Summary collapse
-
#default_file_content ⇒ Object
readonly
Returns the value of attribute default_file_content.
-
#loglevels ⇒ Object
readonly
Returns the value of attribute loglevels.
Instance Method Summary collapse
-
#initialize ⇒ Constants
constructor
A new instance of Constants.
Constructor Details
#initialize ⇒ Constants
Returns a new instance of Constants.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jsondb/constants.rb', line 7 def initialize @default_file_content = { 'db' => "{ \"tables\": {}, \"db\": { \"created_at\": #{Time.now.to_i}, \"updated_at\": #{Time.now.to_i} } }", 'table' => '{ }', 'log' => '', 'raw' => '' } @loglevels = { debug: 1, info: 2, error: 3 } end |
Instance Attribute Details
#default_file_content ⇒ Object (readonly)
Returns the value of attribute default_file_content.
5 6 7 |
# File 'lib/jsondb/constants.rb', line 5 def default_file_content @default_file_content end |
#loglevels ⇒ Object (readonly)
Returns the value of attribute loglevels.
5 6 7 |
# File 'lib/jsondb/constants.rb', line 5 def loglevels @loglevels end |