Sha256: 01a5669c3794b9cbfad5d9c61af12124037ac10a0b1371e6292cf1dbf60510bf

Contents?: true

Size: 372 Bytes

Versions: 1

Compression:

Stored size: 372 Bytes

Contents

module Gobstones

  module Lang

    class VarName

      attr_reader :name

      def initialize(name)
        @name = name
      end

      def ==(var)
        self.class == var.class && self.name == var.name
      end

      alias eql? ==

      def hash
        @name.hash
      end

      def evaluate(context)
        context.get self
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gobstones-0.0.1.1 lib/gobstones/lang/expressions/var_name.rb