Sha256: f0af341ceb8394bc02a1ebd73c30d9726864e3ff05a106a215f931d70e02374f

Contents?: true

Size: 414 Bytes

Versions: 17

Compression:

Stored size: 414 Bytes

Contents

module FeduxOrg
  module Stdlib
    module Colors
      class HtmlColor
        # @param [String] color
        #   string in the html color format
        def initialize( color )
          @color = color
          @validator_regex = /^#[a-f0-9]{6}$/
        end

        # @return [true,false] color string is valid
        def valid?
          @validator_regex === @color
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.3.2 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.3.0 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.2.1 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.1.3 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.1.2 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.1.1 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.1.0 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.39 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.38 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.37 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.36 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.35 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.33 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.32 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.31 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.30 lib/fedux_org/stdlib/colors/html_color.rb
fedux_org-stdlib-0.0.29 lib/fedux_org/stdlib/colors/html_color.rb