Class: Set

Inherits:
Object show all
Includes:
Roby::DRoby::V5::Builtins::SetDumper
Defined in:
lib/roby/backports.rb,
lib/roby/support.rb

Overview

List of backports waiting to be accepted in the backports gem

Instance Method Summary collapse

Methods included from Roby::DRoby::V5::Builtins::SetDumper

#droby_dump, #proxy

Instance Method Details

#compare_by_identityObject

Defined in 2.4.0

Hash#compare_by_identity appeared in ruby 1.9.1



6
7
8
# File 'lib/roby/backports.rb', line 6

def compare_by_identity
    @hash.compare_by_identity
end

#compare_by_identity?Boolean

Defined in 2.4.0

Hash#compare_by_identity? appeard in ruby 1.9.1

Returns:

  • (Boolean)


13
14
15
# File 'lib/roby/backports.rb', line 13

def compare_by_identity?
    @hash.compare_by_identity?
end

#inspectObject



56
57
58
# File 'lib/roby/support.rb', line 56

def inspect
    to_s
end

#intersect?(set) ⇒ Boolean

Returns:

  • (Boolean)


61
62
63
64
65
66
67
68
# File 'lib/roby/support.rb', line 61

def intersect?(set)
    set.is_a?(Set) or raise ArgumentError, "value must be a set"
    if size < set.size
        any? { |o| set.include?(o) }
    else
        set.any? { |o| include?(o) }
    end
end