Class: Yast::BootloaderRoutinesLibIfaceInclude::TmpYAMLFile
- Inherits:
-
Object
- Object
- Yast::BootloaderRoutinesLibIfaceInclude::TmpYAMLFile
- Defined in:
- src/include/bootloader/routines/lib_iface.rb
Instance Attribute Summary (collapse)
-
- (Object) path
readonly
Returns the value of attribute path.
Instance Method Summary (collapse)
- - (Object) data
-
- (TmpYAMLFile) initialize(data = nil)
constructor
A new instance of TmpYAMLFile.
- - (Object) unlink
Constructor Details
- (TmpYAMLFile) initialize(data = nil)
Returns a new instance of TmpYAMLFile
43 44 45 46 |
# File 'src/include/bootloader/routines/lib_iface.rb', line 43 def initialize(data=nil) @path = mktemp write_data(data) unless data.nil? end |
Instance Attribute Details
- (Object) path (readonly)
Returns the value of attribute path
41 42 43 |
# File 'src/include/bootloader/routines/lib_iface.rb', line 41 def path @path end |
Instance Method Details
- (Object) data
52 53 54 |
# File 'src/include/bootloader/routines/lib_iface.rb', line 52 def data YAML.load(SCR.Read(Path.new(".target.string"), path)) end |
- (Object) unlink
48 49 50 |
# File 'src/include/bootloader/routines/lib_iface.rb', line 48 def unlink SCR.Execute(Path.new(".target.remove"), path) end |