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
109 110 111 |
# File '../../library/general/src/modules/Hooks.rb', line 109 def initialize set_default_path end |
Instance Attribute Details
- (Object) path (readonly)
Returns the value of attribute path
107 108 109 |
# File '../../library/general/src/modules/Hooks.rb', line 107 def path @path end |
Instance Method Details
- (Object) children
125 126 127 |
# File '../../library/general/src/modules/Hooks.rb', line 125 def children path.children end |
- (Object) join!(new_path)
113 114 115 |
# File '../../library/general/src/modules/Hooks.rb', line 113 def join! new_path @path = path.join(new_path) end |
- (Object) reset
117 118 119 |
# File '../../library/general/src/modules/Hooks.rb', line 117 def reset set_default_path end |
- (Object) set(new_path)
121 122 123 |
# File '../../library/general/src/modules/Hooks.rb', line 121 def set new_path @path = Pathname.new(new_path) end |
- (Object) to_s
129 130 131 |
# File '../../library/general/src/modules/Hooks.rb', line 129 def to_s path.to_s end |
- (Object) verify!
133 134 135 136 137 138 139 |
# File '../../library/general/src/modules/Hooks.rb', line 133 def verify! if path.exist? path else raise "Hook search path #{path} does not exists" end end |