Module: Vedeu::Presentation::Styles
- Included in:
- Vedeu::Presentation
- Defined in:
- lib/vedeu/output/presentation/styles.rb
Overview
Provides style related presentation behaviour.
Instance Method Summary collapse
-
#style ⇒ Vedeu::Presentation::Style
When the style for the model exists, return it, otherwise returns the parent style, or an empty Style.
-
#style=(value) ⇒ Vedeu::Presentation::Style
Allows the setting of the style by coercing the given value into a Style.
Instance Method Details
#style ⇒ Vedeu::Presentation::Style
When the style for the model exists, return it, otherwise returns the parent style, or an empty Vedeu::Presentation::Style.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vedeu/output/presentation/styles.rb', line 14 def style @style ||= if attributes[:style] Vedeu::Presentation::Style.coerce(attributes[:style]) elsif parent Vedeu::Presentation::Style.coerce(parent.style) else Vedeu::Presentation::Style.new end end |
#style=(value) ⇒ Vedeu::Presentation::Style
Allows the setting of the style by coercing the given value into a Vedeu::Presentation::Style.
31 32 33 |
# File 'lib/vedeu/output/presentation/styles.rb', line 31 def style=(value) @style = Vedeu::Presentation::Style.coerce(value) end |