Sha256: f1b7369f57e65cdd96381e0219d8943858ce3492dcab0752f8c4fc9f47df7125

Contents?: true

Size: 1.51 KB

Versions: 2

Compression:

Stored size: 1.51 KB

Contents

module Wbase
  class << self
    mattr_accessor(
      # Common
      :title,
      :description,
      :url,
      :image,
      :keywords,
      :site_name,
      :admin_email,
      :firehose_email,

      # Landing
      :sub_title,
      :call_to_action,
      :call_to_action_path,
      :getting_started_video,

      # Styles
      :primary_color,
      :success_color,
      :info_color,
      :warning_color,
      :danger_color,

      # Integrations
      :olark_id,
      :ga_id
    )
    [:team,
     :nav_items,
     :features,
     :case_studies,
     :testimonials,
     :socials,
     :plans].each do |setting|
       mattr_accessor setting do
         []
       end
     end

     landing_sections = [
       :nav_view,
       :header_view,
       :features_view,
       :description_view,
       :video_view,
       :customers_view,
       :pricing_view,
       :trial_view,
       :about_view,
       :newsletter_view,
       :team_view,
       :social_view,
       :contact_view,
       :footer_view,
     ]
     landing_sections.each do |setting|
       mattr_accessor setting do
         true
       end
     end
     mattr_accessor :landing_sections do
       landing_sections
     end
  end

  def self.setup(&block)
    yield self
  end

  class Engine < ::Rails::Engine
    isolate_namespace Wbase
    config.generators do |g|
      g.orm             :active_record
      g.template_engine :erb
    end
    config.to_prepare do
      Wbase::ApplicationController.helper Rails.application.helpers
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wbase-0.0.13 lib/wbase/engine.rb
wbase-0.0.12 lib/wbase/engine.rb