Sha256: 6e5500ddf2f9495cdb89cb759d28a847a5b49954452351d075608852abcf2b36

Contents?: true

Size: 449 Bytes

Versions: 15

Compression:

Stored size: 449 Bytes

Contents

module Furnace::AST
  class SymbolicNode
    def initialize(name)
      @name = name.to_sym
    end

    def to_sym
      @name
    end

    def ===(name)
      @name == name.to_sym
    end

    def inspect
      @name.to_s
    end
  end

  class MethodName < SymbolicNode
    def inspect
      ".#{@name}"
    end
  end

  class LocalVariable < SymbolicNode
    def inspect
      "%#{@name}"
    end
  end

  class Constant < SymbolicNode
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
furnace-0.2.5 lib/furnace/ast/symbolic_node.rb
furnace-0.2.4 lib/furnace/ast/symbolic_node.rb
furnace-0.2.3 lib/furnace/ast/symbolic_node.rb
furnace-0.2.2 lib/furnace/ast/symbolic_node.rb
furnace-0.2.1 lib/furnace/ast/symbolic_node.rb
furnace-0.2.0 lib/furnace/ast/symbolic_node.rb
furnace-0.1.2 lib/furnace/ast/symbolic_node.rb
furnace-0.1.1 lib/furnace/ast/symbolic_node.rb
furnace-0.1.0 lib/furnace/ast/symbolic_node.rb
furnace-0.0.8 lib/furnace/ast/symbolic_node.rb
furnace-0.0.7 lib/furnace/ast/symbolic_node.rb
furnace-0.0.6 lib/furnace/ast/symbolic_node.rb
furnace-0.0.4 lib/furnace/ast/symbolic_node.rb
furnace-0.0.3 lib/furnace/ast/symbolic_node.rb
furnace-0.0.2 lib/furnace/ast/symbolic_node.rb