Sha256: bca098a5ec6bfcd14a29dcdcd4a2d45f3e8405ac23e4340fb8ca9c97d7d7c563

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

module Gobstones

  module Lang

    class Definition

      attr_reader :name, :args, :body, :return_statement

      def initialize(name, args, body, return_statement)
        @name = name
        @args = args
        @body = body
        @return_statement = return_statement
      end

      def ==(other)
        self.class == other.class &&
        self.name == other.name &&
        self.args == other.args &&
        self.body == other.body &&
        self.return_statement == other.return_statement
      end

      def named?(a_name)
        name == a_name
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gobstones-0.0.1.1 lib/gobstones/lang/definitions/definition.rb