Class: Garage::Docs::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/garage/docs/config.rb

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
# File 'lib/garage/docs/config.rb', line 9

def initialize
  reset
end

Instance Attribute Details

#authenticateObject

Returns the value of attribute authenticate.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def authenticate
  @authenticate
end

#console_app_secretObject

Returns the value of attribute console_app_secret.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def console_app_secret
  @console_app_secret
end

#console_app_uidObject

Returns the value of attribute console_app_uid.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def console_app_uid
  @console_app_uid
end

#current_user_methodObject

Returns the value of attribute current_user_method.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def current_user_method
  @current_user_method
end

#docs_authorization_methodObject

Returns the value of attribute docs_authorization_method.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def docs_authorization_method
  @docs_authorization_method
end

#docs_cache_enabledObject

Returns the value of attribute docs_cache_enabled.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def docs_cache_enabled
  @docs_cache_enabled
end

#document_rootObject

Returns the value of attribute document_root.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def document_root
  @document_root
end

#remote_serverObject

Returns the value of attribute remote_server.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def remote_server
  @remote_server
end

#signout_pathObject

Returns the value of attribute signout_path.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def signout_path
  @signout_path
end

#signout_request_methodObject

Returns the value of attribute signout_request_method.



4
5
6
# File 'lib/garage/docs/config.rb', line 4

def signout_request_method
  @signout_request_method
end

Instance Method Details

#resetObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/garage/docs/config.rb', line 13

def reset
  @document_root = Rails.root.join('doc/garage')
  @current_user_method = Proc.new { current_user }
  @authenticate = Proc.new {}
  @console_app_uid, @console_app_secret = nil, nil
  @remote_server = Proc.new {|request| "#{request.protocol}#{request.host_with_port}" }
  @docs_authorization_method = nil
  @docs_cache_enabled = true
  @signout_path = '/signout'
  @signout_request_method = :post
end