Sha256: cbd3c5c612414e6d12430ba04ca1fe5f88bb11ebf4a3c77bcb45e375a9838e80

Contents?: true

Size: 784 Bytes

Versions: 11

Compression:

Stored size: 784 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>|Array<String>|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

11 entries across 11 versions & 1 rubygems

Version Path
vedeu-0.4.16 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.15 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.14 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.13 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.12 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.11 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.10 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.9 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.8 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.7 lib/vedeu/dsl/shared/style.rb
vedeu-0.4.6 lib/vedeu/dsl/shared/style.rb