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