Sha256: 9cf69424fa5326fc27c3ed196cb4d8178c688705d51bbd53092d00273ac65401

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

class GraphViz
  class Types
    class LblString < Common
      def check(data)
        return data
      end
      
      def output
        html = /^<([<|(^<)*<].*)>$/m.match(@data)
        if html != nil
          "<#{html[1]}>"
        else
          @data.to_s.inspect.gsub( "\\\\", "\\" )
        end
      end
      
      alias :to_gv :output
      alias :to_s :output
      alias :to_ruby :output
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.7 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.6 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.5 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.4 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.3 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.2 lib/graphviz/types/lbl_string.rb
ruby-graphviz-1.0.1 lib/graphviz/types/lbl_string.rb