Sha256: 4e35f637e1afcfa4eee5ec308345c1603a50365d0368d806f6fb80d7b8ac5617

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

module HighVoltage
  module Configuration
    attr_accessor(
      :action_caching,
      :action_caching_layout,
      :content_path,
      :home_page,
      :layout,
      :page_caching,
      :route_drawer,
      :routes,
    )

    def configure
      yield self
    end

    def self.extended(base)
      base.set_default_configuration
    end

    def set_default_configuration
      self.action_caching = false
      self.action_caching_layout = true
      self.content_path = 'pages/'
      self.home_page = nil
      self.layout = 'application'
      self.page_caching = false
      self.route_drawer = HighVoltage::RouteDrawers::Default
      self.routes = true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
high_voltage-2.1.0 lib/high_voltage/configuration.rb