Module: Gadgeto::Dslable
- Defined in:
- lib/gadgeto/dslable.rb
Overview
Usage
class Foo
include Dslable
include Dslable::Display
dslable_method :item, :key, '*arguments'
def inspect
attributes[:key]
end
end
f = Foo.new
f.draw do
item 'Startseite', :baem => :bum do
item 'terms'
item 'imprint'
end
item 'Praemien' do
item 'Kueche' do
item 'Toepfe'
end
end
end
f.display :items
Defined Under Namespace
Modules: ClassMethods, Display
Class Method Summary
collapse
Class Method Details
.extended(base) ⇒ Object
40
41
42
43
44
|
# File 'lib/gadgeto/dslable.rb', line 40
def self.extended(base)
class << base
self.extend ClassMethods
end
end
|
.included(base) ⇒ Object
36
37
38
|
# File 'lib/gadgeto/dslable.rb', line 36
def self.included(base)
base.extend ClassMethods
end
|