Class: X11Requirement

Inherits:
Requirement show all
Includes:
Comparable
Defined in:
Library/Homebrew/requirements/x11_requirement.rb,
Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb

Constant Summary

Constants included from Dependable

Dependable::RESERVED_TAGS

Instance Attribute Summary

Attributes inherited from Requirement

#cask, #download, #name, #tags

Instance Method Summary collapse

Methods inherited from Requirement

#==, default_formula, #display_s, #env, env, #env_proc, expand, #fatal?, #hash, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

Methods included from BuildEnvironment::DSL

#env

Methods included from Dependable

#build?, #option_tags, #optional?, #options, #recommended?, #required?, #run?

Constructor Details

#initialize(name = "x11", tags = []) ⇒ X11Requirement

Returns a new instance of X11Requirement



10
11
12
13
14
15
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 10

def initialize(name = "x11", tags = [])
  @name = name
  # no-op on version specified as a tag argument
  tags.shift if /(\d\.)+\d/ =~ tags.first
  super(tags)
end

Instance Method Details

#<=>(other) ⇒ Object



47
48
49
50
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 47

def <=>(other)
  return unless other.is_a? X11Requirement
  0
end

#inspectObject



52
53
54
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 52

def inspect
  "#<#{self.class.name}: #{name.inspect} #{tags.inspect}>"
end

#messageObject



43
44
45
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 43

def message
  "X11 is required to install this formula, either Xorg #{min_version} or xdpyinfo #{min_xdpyinfo_version}, or newer. #{super}"
end

#min_versionObject



17
18
19
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 17

def min_version
  "1.12.2"
end

#min_xdpyinfo_versionObject



21
22
23
# File 'Library/Homebrew/requirements/x11_requirement.rb', line 21

def min_xdpyinfo_version
  "1.3.0"
end