Sha256: 418eda39af155ef519892d081650a0ca2529fdfa73317fb7228922b6676607f9

Contents?: true

Size: 793 Bytes

Versions: 6

Compression:

Stored size: 793 Bytes

Contents

module Tabulous
  module Dsl
    class Setup
      class << self

        def process(&block)
          instance_exec(OldVersionChecker.new, &block)
        end

        def customize(&block)
          Dsl::Config.process(&block)
        end

        def use_css_scaffolding(&block)
          ::Tabulous::Config.use_css_scaffolding = true
          Dsl::Config.process(&block) if block_given?
        end

        def tabs(tabset_name = :default, &block)
          tabset = Dsl::Tabs.process(&block)
          Tabsets.add(tabset_name, tabset)
        end

        def method_missing(method, *args, &block)
          raise UnknownDeclarationError, "Unknown declaration '#{method}'. Valid declarations here are tabs, customize, and use_css_scaffolding."
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tabulous-2.1.4 lib/tabulous/dsl/setup.rb
tabulous-2.1.3 lib/tabulous/dsl/setup.rb
tabulous-2.1.2 lib/tabulous/dsl/setup.rb
tabulous-2.1.1 lib/tabulous/dsl/setup.rb
tabulous-2.1.0 lib/tabulous/dsl/setup.rb
tabulous-2.0.0 lib/tabulous/dsl/setup.rb