Class: Zypper::Upgraderepo::DirRequest
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Zypper::Upgraderepo::DirRequest
- Defined in:
- lib/zypper/upgraderepo/requests/local.rb
Overview
Base class for a local directory request.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dir_path ⇒ Object
readonly
Returns the value of attribute dir_path.
Instance Method Summary collapse
- #available? ⇒ Boolean
- #cache! ⇒ Object
- #forbidden? ⇒ Boolean
-
#initialize(obj, _timeout) ⇒ DirRequest
constructor
A new instance of DirRequest.
- #not_found? ⇒ Boolean
- #redirected? ⇒ Boolean
- #redirected_to ⇒ Object
- #status ⇒ Object
- #timeout? ⇒ Boolean
Constructor Details
#initialize(obj, _timeout) ⇒ DirRequest
Returns a new instance of DirRequest.
13 14 15 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 13 def initialize(obj, _timeout) super obj end |
Instance Attribute Details
#dir_path ⇒ Object (readonly)
Returns the value of attribute dir_path.
11 12 13 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 11 def dir_path @dir_path end |
Instance Method Details
#available? ⇒ Boolean
17 18 19 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 17 def available? Dir.exist? ping end |
#cache! ⇒ Object
45 46 47 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 45 def cache! @dir_path = nil end |
#forbidden? ⇒ Boolean
33 34 35 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 33 def forbidden? File.readable? ping end |
#not_found? ⇒ Boolean
29 30 31 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 29 def not_found? !available? end |
#redirected? ⇒ Boolean
21 22 23 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 21 def redirected? File.symlink? ping end |
#redirected_to ⇒ Object
25 26 27 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 25 def redirected_to File.realpath ping end |
#status ⇒ Object
41 42 43 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 41 def status File.stat ping end |
#timeout? ⇒ Boolean
37 38 39 |
# File 'lib/zypper/upgraderepo/requests/local.rb', line 37 def timeout? false end |