Class: MachineShop::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/machineshop/configuration.rb

Direct Known Subclasses

Database

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_versionObject

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_timeObject

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_hostObject

Returns the value of attribute db_host.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def db_host
  @db_host
end

#db_nameObject

Returns the value of attribute db_name.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def db_name
  @db_name
end

#db_passwordObject

Returns the value of attribute db_password.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def db_password
  @db_password
end

#db_usernameObject

Returns the value of attribute db_username.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def db_username
  @db_username
end

#enable_cachingObject

Returns the value of attribute enable_caching.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def enable_caching
  @enable_caching
end

#expiry_timeObject

Returns the value of attribute expiry_time.



3
4
5
# File 'lib/machineshop/configuration.rb', line 3

def expiry_time
  @expiry_time
end