Module: Osheet::Mixin::ClassMethods
- Defined in:
- lib/osheet/mixin.rb
Instance Method Summary collapse
- #partial(name, &build) ⇒ Object
- #partials ⇒ Object
- #style(*selectors, &build) ⇒ Object
- #styles ⇒ Object
- #template(element, name, &build) ⇒ Object
- #templates ⇒ Object
Instance Method Details
#partial(name, &build) ⇒ Object
40 41 42 43 44 |
# File 'lib/osheet/mixin.rb', line 40 def partial(name, &build) instance_variable_set("@p", (instance_variable_get("@p") || []) << Args.new(name, &build) ) end |
#partials ⇒ Object
46 47 48 |
# File 'lib/osheet/mixin.rb', line 46 def partials instance_variable_get("@p") || [] end |
#style(*selectors, &build) ⇒ Object
20 21 22 23 24 |
# File 'lib/osheet/mixin.rb', line 20 def style(*selectors, &build) instance_variable_set("@s", (instance_variable_get("@s") || []) << Args.new(*selectors, &build) ) end |
#styles ⇒ Object
26 27 28 |
# File 'lib/osheet/mixin.rb', line 26 def styles instance_variable_get("@s") || [] end |
#template(element, name, &build) ⇒ Object
30 31 32 33 34 |
# File 'lib/osheet/mixin.rb', line 30 def template(element, name, &build) instance_variable_set("@t", (instance_variable_get("@t") || []) << Args.new(element, name, &build) ) end |
#templates ⇒ Object
36 37 38 |
# File 'lib/osheet/mixin.rb', line 36 def templates instance_variable_get("@t") || [] end |