Sha256: 0024f8707fac6b92ca44c60607cb00ae65ae783c69a9a6637369c8276ca1575f

Contents?: true

Size: 756 Bytes

Versions: 5

Compression:

Stored size: 756 Bytes

Contents

module Vedeu

  module DSL

    # Provides a style helper for use in the {DSL::Interface}, {DSL::Line} and
    # {DSL::Stream} classes.
    #
    # @api public
    module Style

      # Define a style or styles for an interface, line or a stream.
      #
      # @param value [Array|Symbol|String]
      #
      # @example
      #   interface 'my_interface' do
      #     style 'normal'
      #     ...
      #
      #   lines do
      #     style ['bold', 'underline']
      #     ...
      #
      #   stream do
      #     style 'blink'
      #     ...
      #
      # @return [Vedeu::Style]
      def style(value)
        model.style = Vedeu::Style.coerce(value)
      end
      alias_method :styles, :style

    end # Style

  end # DSL

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.3.4 lib/vedeu/dsl/shared/style.rb
vedeu-0.3.3 lib/vedeu/dsl/shared/style.rb
vedeu-0.3.2 lib/vedeu/dsl/shared/style.rb
vedeu-0.3.1 lib/vedeu/dsl/shared/style.rb
vedeu-0.3.0 lib/vedeu/dsl/shared/style.rb