Sha256: 3603f2dd3582f1fd224ab0af3f105134782dc47fa19775beab98217b6729cbe6

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 Bytes

Contents

# encoding: utf-8

[:Macro, :Builtin, :Dequote, :Splice].each do |name|
  Rouge.const_set name, Class.new {
    attr_reader :inner

    def initialize(inner)
      @inner = inner
    end

    def self.[](inner)
      new inner
    end

    def inspect
      "#{self.class.name}[#{@inner.inspect}]"
    end

    def ==(right)
      right.is_a?(self.class) and right.inner == @inner
    end
  }
end

class Rouge::Builtin
  def to_s
    "rouge.builtin/#{inner.name}"
  end
end

# vim: set sw=2 et cc=80:

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rouge-lang-0.0.16 lib/rouge/wrappers.rb
rouge-lang-0.0.15 lib/rouge/wrappers.rb
rouge-lang-0.0.14 lib/rouge/wrappers.rb
rouge-lang-0.0.13 lib/rouge/wrappers.rb
rouge-lang-0.0.12 lib/rouge/wrappers.rb
rouge-lang-0.0.11 lib/rouge/wrappers.rb
rouge-lang-0.0.10 lib/rouge/wrappers.rb