Class: PubGrub::VersionRange::Empty

Inherits:
PubGrub::VersionRange show all
Defined in:
lib/pub_grub/version_range.rb

Instance Attribute Summary

Attributes inherited from PubGrub::VersionRange

#include_max, #include_min, #max, #min

Instance Method Summary collapse

Methods inherited from PubGrub::VersionRange

any, #compare_version, #contiguous_to?, empty, #inspect, #intersect, #partition_versions, #span, #strictly_higher?, #strictly_lower?, #to_s, #union

Constructor Details

#initializeEmpty

Returns a new instance of Empty.



15
16
# File 'lib/pub_grub/version_range.rb', line 15

def initialize
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
# File 'lib/pub_grub/version_range.rb', line 42

def ==(other)
  other.class == self.class
end

#allows_all?(other) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/pub_grub/version_range.rb', line 26

def allows_all?(other)
  other.empty?
end

#any?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/pub_grub/version_range.rb', line 34

def any?
  false
end

#constraintsObject



38
39
40
# File 'lib/pub_grub/version_range.rb', line 38

def constraints
  ["(no versions)"]
end

#empty?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/pub_grub/version_range.rb', line 18

def empty?
  true
end

#include?(_) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/pub_grub/version_range.rb', line 30

def include?(_)
  false
end

#intersects?(_) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/pub_grub/version_range.rb', line 22

def intersects?(_)
  false
end

#invertObject



46
47
48
# File 'lib/pub_grub/version_range.rb', line 46

def invert
  VersionRange.any
end

#select_versions(_) ⇒ Object



50
51
52
# File 'lib/pub_grub/version_range.rb', line 50

def select_versions(_)
  []
end