class RenuoCmsRails::Config
Attributes
api_host[RW]
api_key[RW]
content_path_generator[RW]
private_api_key[RW]
Public Class Methods
new()
click to toggle source
# File lib/renuo_cms_rails/config.rb, line 26 def initialize self.api_host = ENV['RENUO_CMS_API_HOST'] self.api_key = ENV['RENUO_CMS_API_KEY'] self.private_api_key = ENV['RENUO_CMS_PRIVATE_API_KEY'] self.content_path_generator = ->(path) { "#{path}-#{I18n.locale}" } end
Public Instance Methods
api_host_with_protocol()
click to toggle source
# File lib/renuo_cms_rails/config.rb, line 33 def api_host_with_protocol host = api_host return host if host.start_with?('https://', 'http://', '//') "https://#{host}" end