Class: RailsHttpLab::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
15
16
17
# File 'lib/rails_http_lab/configuration.rb', line 10

def initialize
  @mount_path        = "/rails/http-lab"
  @storage_path      = nil
  @enabled_envs      = %i[development]
  @authenticator     = nil
  @executor_timeout  = 30
  @executor_max_body = 10 * 1024 * 1024
end

Instance Attribute Details

#authenticatorObject

Returns the value of attribute authenticator.



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

def authenticator
  @authenticator
end

#enabled_envsObject

Returns the value of attribute enabled_envs.



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

def enabled_envs
  @enabled_envs
end

#executor_max_bodyObject

Returns the value of attribute executor_max_body.



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

def executor_max_body
  @executor_max_body
end

#executor_timeoutObject

Returns the value of attribute executor_timeout.



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

def executor_timeout
  @executor_timeout
end

#mount_pathObject

Returns the value of attribute mount_path.



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

def mount_path
  @mount_path
end

#storage_pathObject

Returns the value of attribute storage_path.



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

def storage_path
  @storage_path
end

Instance Method Details

#resolved_storage_pathObject



19
20
21
# File 'lib/rails_http_lab/configuration.rb', line 19

def resolved_storage_path
  @storage_path || default_storage_path
end