Class: Yast::BootloaderRoutinesLibIfaceInclude::TmpYAMLFile

Inherits:
Object
  • Object
show all
Defined in:
src/include/bootloader/routines/lib_iface.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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


48
49
50
# File 'src/include/bootloader/routines/lib_iface.rb', line 48

def unlink
  SCR.Execute(Path.new(".target.remove"), path)
end