Sha256: b92fabac49bc4175f8b49990c30dcc23de86f74c967b14f234cb8b73c131e8cc

Contents?: true

Size: 736 Bytes

Versions: 7

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

module MiniKraken
  module Core
    class Relation
      # @return [String] Name of the relation.
      attr_reader :name

      # @return [String, NilClass] Optional alternative name of the relation.
      attr_reader :alt_name

      # @param aName [String] Name of the relation.
      # @param alternateName [String, NilClass] Alternative name (optional).
      def initialize(aName, alternateName = nil)
        @name = aName
        @alt_name = alternateName
      end

      # Number of arguments for the relation.
      # @return [Integer]
      def arity
        raise NotImplementedError
      end

      def inspect
        alt_name || name
      end
    end # class
  end # module
end # module

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mini_kraken-0.1.11 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.10 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.09 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.08 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.07 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.06 lib/mini_kraken/core/relation.rb
mini_kraken-0.1.05 lib/mini_kraken/core/relation.rb