Sha256: 6cfdbea61fad69ea0c788868273aa1fa86585928f5b1831c2bffc8fcb9f6e14f
Contents?: true
Size: 579 Bytes
Versions: 50
Compression:
Stored size: 579 Bytes
Contents
require 'actv/base' module ACTV class Identity < ACTV::Base # Initializes a new object # # @param attrs [Hash] # @raise [ArgumentError] Error raised when supplied argument is missing an :id key. # @return [ACTV::Base] def initialize(attrs={}) super raise ArgumentError, 'argument must have an :id key' unless id end # @param other [ACTV::Identity] # @return [Boolean] def ==(other) super || attr_equal(:id, other) || attrs_equal(other) end # @return [Integer] def id @attrs[:id] end end end
Version data entries
50 entries across 50 versions & 1 rubygems