Class: Tabulous::Dsl::Setup
- Inherits:
-
Object
- Object
- Tabulous::Dsl::Setup
- Defined in:
- lib/tabulous/dsl/setup.rb
Class Method Summary collapse
- .customize(&block) ⇒ Object
- .method_missing(method, *args, &block) ⇒ Object
- .process(&block) ⇒ Object
- .tabs(tabset_name = :default, &block) ⇒ Object
- .use_css_scaffolding(&block) ⇒ Object
Class Method Details
.customize(&block) ⇒ Object
10 11 12 |
# File 'lib/tabulous/dsl/setup.rb', line 10 def customize(&block) Dsl::Config.process(&block) end |
.method_missing(method, *args, &block) ⇒ Object
24 25 26 |
# File 'lib/tabulous/dsl/setup.rb', line 24 def method_missing(method, *args, &block) raise UnknownDeclarationError, "Unknown declaration '#{method}'. Valid declarations here are tabs, customize, and use_css_scaffolding." end |
.process(&block) ⇒ Object
6 7 8 |
# File 'lib/tabulous/dsl/setup.rb', line 6 def process(&block) instance_exec(OldVersionChecker.new, &block) end |
.tabs(tabset_name = :default, &block) ⇒ Object
19 20 21 22 |
# File 'lib/tabulous/dsl/setup.rb', line 19 def tabs(tabset_name = :default, &block) tabset = Dsl::Tabs.process(&block) Tabsets.add(tabset_name, tabset) end |
.use_css_scaffolding(&block) ⇒ Object
14 15 16 17 |
# File 'lib/tabulous/dsl/setup.rb', line 14 def use_css_scaffolding(&block) ::Tabulous::Config.use_css_scaffolding = true Dsl::Config.process(&block) if block_given? end |