Sha256: b21d228c136392948cf35fe2c7b29dff478a9dabdc5cd6d0b73110da8b20db52

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

module Rocx
  module Properties
    class Spacing < ComplexProperty
      include AttributeBuilder

      VALID_LINE_RULES = %i(atLeast auto exact)

      attribute :after, expects: :positive_integer
      attribute :after_auto, expects: :on_or_off, displays_as: :afterAutospacing
      attribute :after_lines, expects: :integer
      attribute :before, expects: :positive_integer
      attribute :before_auto, expects: :on_or_off, displays_as: :beforeAutospacing
      attribute :before_lines, expects: :integer
      attribute :line, expects: :integer
      attribute :line_rule, expects: :valid_line_rule

    private

      def valid_line_rule(value)
        valid_in? value, VALID_LINE_RULES
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rocx-0.5.8 lib/rocx/properties/spacing.rb