Sha256: 212db2c44f8d823666f86fda4964bb46bad42940704bd2a678642655b9298ca8

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

class GraphViz
  class Types
    class ColorList < Common
      def check(data)
        data = data.to_s if data.is_a?(Symbol)
        @to_ruby = data.split(/\s*:\s*/).map { |c| GraphViz::Types::Color.new(c).to_ruby }
        return data
      end
      
      def output
        return @data.to_s.inspect.gsub( "\\\\", "\\" )
      end
      
      alias :to_gv :output
      alias :to_s :output

      def to_ruby
         @data
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.3 lib/graphviz/types/color_list.rb
ruby-graphviz-1.0.2 lib/graphviz/types/color_list.rb
ruby-graphviz-1.0.1 lib/graphviz/types/color_list.rb