Sha256: 5713f639b231c9e036bb9dd0ad748529d5d4300e9fa651e5a17ead5ee7f7fc1f
Contents?: true
Size: 1.08 KB
Versions: 17
Compression:
Stored size: 1.08 KB
Contents
module Vedeu module Presentation # Provides style related presentation behaviour. # module Styles # When the style for the model exists, return it, otherwise # returns the parent style, or an empty # {Vedeu::Presentation::Style}. # # @return [Vedeu::Presentation::Style] def style @style ||= if attributes[:style] Vedeu::Presentation::Style.coerce(attributes[:style]) elsif self.is_a?(Vedeu::Views::Char) && name Vedeu::Presentation::Style.coerce(interface.style) elsif parent Vedeu::Presentation::Style.coerce(parent.style) else Vedeu::Presentation::Style.new end end # Allows the setting of the style by coercing the given value # into a {Vedeu::Presentation::Style}. # # @return [Vedeu::Presentation::Style] def style=(value) @style = Vedeu::Presentation::Style.coerce(value) end end # Style end # Presentation end # Vedeu
Version data entries
17 entries across 17 versions & 1 rubygems