Class: Rooftop::Rails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rooftop/rails.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



47
48
49
50
51
52
53
54
55
56
# File 'lib/rooftop/rails.rb', line 47

def initialize
  @authenticate_webhooks = true
  @perform_http_response_caching = ::Rails.configuration.action_controller.perform_caching
  @perform_object_caching = ->{::Rails.configuration.action_controller.perform_caching}
  @cache_store = ::Rails.cache
  @cache_logger = ::Rails.logger
  @ssl_options = {}
  @resource_route_map = {}
  @logger = nil
end

Instance Attribute Details

#advanced_optionsObject

Returns the value of attribute advanced_options.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def advanced_options
  @advanced_options
end

#api_pathObject

Returns the value of attribute api_path.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def api_path
  @api_path
end

#api_tokenObject

Returns the value of attribute api_token.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def api_token
  @api_token
end

#authenticate_webhooksObject

Returns the value of attribute authenticate_webhooks.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def authenticate_webhooks
  @authenticate_webhooks
end

#cache_loggerObject

Returns the value of attribute cache_logger.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def cache_logger
  @cache_logger
end

#cache_storeObject

Returns the value of attribute cache_store.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def cache_store
  @cache_store
end

#extra_headersObject

Returns the value of attribute extra_headers.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def extra_headers
  @extra_headers
end

#loggerObject

Returns the value of attribute logger.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def logger
  @logger
end

#perform_http_response_cachingObject

Returns the value of attribute perform_http_response_caching.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def perform_http_response_caching
  @perform_http_response_caching
end

#post_type_mappingObject

Returns the value of attribute post_type_mapping.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def post_type_mapping
  @post_type_mapping
end

#proxyObject

Returns the value of attribute proxy.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def proxy
  @proxy
end

#resource_route_mapObject

Returns the value of attribute resource_route_map.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def resource_route_map
  @resource_route_map
end

#site_nameObject

Returns the value of attribute site_name.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def site_name
  @site_name
end

#ssl_optionsObject

Returns the value of attribute ssl_options.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def ssl_options
  @ssl_options
end

#urlObject

Returns the value of attribute url.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def url
  @url
end

#webhooks_passwordObject

Returns the value of attribute webhooks_password.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def webhooks_password
  @webhooks_password
end

#webhooks_usernameObject

Returns the value of attribute webhooks_username.



17
18
19
# File 'lib/rooftop/rails.rb', line 17

def webhooks_username
  @webhooks_username
end

Instance Method Details

#perform_object_cachingObject



43
44
45
# File 'lib/rooftop/rails.rb', line 43

def perform_object_caching
  @perform_object_caching.call
end

#perform_object_caching=(perform_caching) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/rooftop/rails.rb', line 35

def perform_object_caching=(perform_caching)
  if perform_caching.is_a?(Proc)
    @perform_object_caching = perform_caching
  else
    @perform_object_caching = ->{perform_caching}
  end
end