Class: MachineShop::Configuration
- Inherits:
-
Object
- Object
- MachineShop::Configuration
- Defined in:
- lib/machineshop/configuration.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_version ⇒ Object
Returns the value of attribute base_version.
-
#custom_endpoints_cache_time ⇒ Object
Returns the value of attribute custom_endpoints_cache_time.
-
#db_host ⇒ Object
Returns the value of attribute db_host.
-
#db_name ⇒ Object
Returns the value of attribute db_name.
-
#db_password ⇒ Object
Returns the value of attribute db_password.
-
#db_username ⇒ Object
Returns the value of attribute db_username.
-
#enable_caching ⇒ Object
Returns the value of attribute enable_caching.
-
#expiry_time ⇒ Object
Returns the value of attribute expiry_time.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 |
# File 'lib/machineshop/configuration.rb', line 5 def initialize #default values @expiry_time=0 @enable_caching = true @base_version = "v0" @custom_endpoints_cache_time = lambda{86400.seconds.ago} #default 1 day end |
Instance Attribute Details
#base_version ⇒ Object
Returns the value of attribute base_version.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def base_version @base_version end |
#custom_endpoints_cache_time ⇒ Object
Returns the value of attribute custom_endpoints_cache_time.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def custom_endpoints_cache_time @custom_endpoints_cache_time end |
#db_host ⇒ Object
Returns the value of attribute db_host.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def db_host @db_host end |
#db_name ⇒ Object
Returns the value of attribute db_name.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def db_name @db_name end |
#db_password ⇒ Object
Returns the value of attribute db_password.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def db_password @db_password end |
#db_username ⇒ Object
Returns the value of attribute db_username.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def db_username @db_username end |
#enable_caching ⇒ Object
Returns the value of attribute enable_caching.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def enable_caching @enable_caching end |
#expiry_time ⇒ Object
Returns the value of attribute expiry_time.
3 4 5 |
# File 'lib/machineshop/configuration.rb', line 3 def expiry_time @expiry_time end |