Sha256: 6b0a886c7cd4ac44ee4705358c9c27937c2fd928c82c66638dbd342165b10e37

Contents?: true

Size: 718 Bytes

Versions: 6

Compression:

Stored size: 718 Bytes

Contents

module HighVoltage
  module Configuration
    attr_accessor(
      :content_path,
      :home_page,
      :layout,
      :parent_engine,
      :route_drawer,
      :routes,
    )

    def configure
      yield self
    end

    def self.extended(base)
      base.set_default_configuration
    end

    def page_ids
      HighVoltage::PageCollector.new(HighVoltage.full_path).page_ids
    end

    def full_path
      Rails.root.join("app", "views", HighVoltage.content_path)
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
high_voltage-4.0.0 lib/high_voltage/configuration.rb
high_voltage-4.0.0.rc1 lib/high_voltage/configuration.rb
high_voltage-3.1.2 lib/high_voltage/configuration.rb
high_voltage-3.1.1 lib/high_voltage/configuration.rb
high_voltage-3.1.0 lib/high_voltage/configuration.rb
high_voltage-3.0.0 lib/high_voltage/configuration.rb