lib/cloudflair/api/zone/settings.rb in cloudflair-0.2.5 vs lib/cloudflair/api/zone/settings.rb in cloudflair-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'cloudflair/api/zone/settings/advanced_ddos'
require 'cloudflair/api/zone/settings/always_online'
require 'cloudflair/api/zone/settings/browser_cache_ttl'
require 'cloudflair/api/zone/settings/browser_check'
require 'cloudflair/api/zone/settings/cache_level'
@@ -36,39 +38,39 @@
def initialize(zone_id)
@zone_id = zone_id
end
{
- advanced_ddos: Cloudflair::AdvancedDdos,
- always_online: Cloudflair::AlwaysOnline,
- browser_cache_ttl: Cloudflair::BrowserCacheTtl,
- browser_check: Cloudflair::BrowserCheck,
- cache_level: Cloudflair::CacheLevel,
- challenge_ttl: Cloudflair::ChallengeTtl,
- development_mode: Cloudflair::DevelopmentMode,
- email_obfuscation: Cloudflair::EmailObfuscation,
- hotlink_protection: Cloudflair::HotlinkProtection,
- ip_geolocation: Cloudflair::IpGeolocation,
- ipv6: Cloudflair::Ipv6,
- minify: Cloudflair::Minify,
- mirage: Cloudflair::Mirage,
- mobile_redirect: Cloudflair::MobileRedirect,
+ advanced_ddos: Cloudflair::AdvancedDdos,
+ always_online: Cloudflair::AlwaysOnline,
+ browser_cache_ttl: Cloudflair::BrowserCacheTtl,
+ browser_check: Cloudflair::BrowserCheck,
+ cache_level: Cloudflair::CacheLevel,
+ challenge_ttl: Cloudflair::ChallengeTtl,
+ development_mode: Cloudflair::DevelopmentMode,
+ email_obfuscation: Cloudflair::EmailObfuscation,
+ hotlink_protection: Cloudflair::HotlinkProtection,
+ ip_geolocation: Cloudflair::IpGeolocation,
+ ipv6: Cloudflair::Ipv6,
+ minify: Cloudflair::Minify,
+ mirage: Cloudflair::Mirage,
+ mobile_redirect: Cloudflair::MobileRedirect,
origin_error_page_pass_thru: Cloudflair::OriginErrorPagePassThru,
- polish: Cloudflair::Polish,
- prefetch_preload: Cloudflair::PrefetchPreload,
- response_buffering: Cloudflair::ResponseBuffering,
- rocket_loader: Cloudflair::RocketLoader,
- security_header: Cloudflair::SecurityHeader,
- security_level: Cloudflair::SecurityLevel,
- server_side_exclude: Cloudflair::ServerSideExclude,
+ polish: Cloudflair::Polish,
+ prefetch_preload: Cloudflair::PrefetchPreload,
+ response_buffering: Cloudflair::ResponseBuffering,
+ rocket_loader: Cloudflair::RocketLoader,
+ security_header: Cloudflair::SecurityHeader,
+ security_level: Cloudflair::SecurityLevel,
+ server_side_exclude: Cloudflair::ServerSideExclude,
sort_query_string_for_cache: Cloudflair::SortQueryStringForCache,
- ssl: Cloudflair::Ssl,
- tls_client_auth: Cloudflair::TlsClientAuth,
- tls_1_2_only: Cloudflair::Tls12Only,
- tls_1_3: Cloudflair::Tls13,
- true_client_ip_header: Cloudflair::TrueClientIpHeader,
- waf: Cloudflair::Waf,
- websockets: Cloudflair::Websockets,
+ ssl: Cloudflair::Ssl,
+ tls_client_auth: Cloudflair::TlsClientAuth,
+ tls_1_2_only: Cloudflair::Tls12Only,
+ tls_1_3: Cloudflair::Tls13,
+ true_client_ip_header: Cloudflair::TrueClientIpHeader,
+ waf: Cloudflair::Waf,
+ websockets: Cloudflair::Websockets
}.each do |method, klass|
define_method method do
klass.new @zone_id
end
end