Class: Yast::HooksClass::SearchPath
- Inherits:
-
Object
- Object
- Yast::HooksClass::SearchPath
- Defined in:
- ../../library/general/src/modules/Hooks.rb
Constant Summary
- DEFAULT_DIR =
'/var/lib/YaST2/hooks'
Instance Attribute Summary (collapse)
-
- (Object) path
readonly
Returns the value of attribute path.
Instance Method Summary (collapse)
- - (Object) children
-
- (SearchPath) initialize
constructor
A new instance of SearchPath.
- - (Object) join!(new_path)
- - (Object) reset
- - (Object) set(new_path)
- - (Object) to_s
- - (Object) verify!
Constructor Details
- (SearchPath) initialize
Returns a new instance of SearchPath
112 113 114 |
# File '../../library/general/src/modules/Hooks.rb', line 112 def initialize set_default_path end |
Instance Attribute Details
- (Object) path (readonly)
Returns the value of attribute path
110 111 112 |
# File '../../library/general/src/modules/Hooks.rb', line 110 def path @path end |
Instance Method Details
- (Object) children
128 129 130 |
# File '../../library/general/src/modules/Hooks.rb', line 128 def children path.children end |
- (Object) join!(new_path)
116 117 118 |
# File '../../library/general/src/modules/Hooks.rb', line 116 def join! new_path @path = path.join(new_path) end |
- (Object) reset
120 121 122 |
# File '../../library/general/src/modules/Hooks.rb', line 120 def reset set_default_path end |
- (Object) set(new_path)
124 125 126 |
# File '../../library/general/src/modules/Hooks.rb', line 124 def set new_path @path = Pathname.new(new_path) end |
- (Object) to_s
132 133 134 |
# File '../../library/general/src/modules/Hooks.rb', line 132 def to_s path.to_s end |
- (Object) verify!
136 137 138 139 140 141 142 |
# File '../../library/general/src/modules/Hooks.rb', line 136 def verify! if path.exist? path else raise "Hook search path #{path} does not exists" end end |