Parent

Files

Rumix::Registry

Constants

PRIMARY_KEY
(Not documented)
SUB_KEY
(Not documented)

Attributes

install_path[RW]

(Not documented)

Public Class Methods

load(sub_key = SUB_KEY) click to toggle source

(Not documented)

# File rumix/registry.rb, line 12
                def self.load(sub_key = SUB_KEY)
                        self.new(sub_key).load
                end
new(sub_key = SUB_KEY) click to toggle source

(Not documented)

# File rumix/registry.rb, line 16
                def initialize(sub_key = SUB_KEY)
                        @sub_key = sub_key
                        clear
                end

Public Instance Methods

clear() click to toggle source

(Not documented)

# File rumix/registry.rb, line 21
                def clear
                        @install_path = nil
                        return self
                end
load() click to toggle source

Try to load registry. If fail, clear itself. Return: self

# File rumix/registry.rb, line 28
                def load
                        begin
                                PRIMARY_KEY.open(@sub_key) do |reg|
                                        @install_path = reg['InstallPath']
                                end
                        rescue Win32::Registry::Error
                                clear
                        end
                        
                        return self
                end
save() click to toggle source

Alias for store

store() click to toggle source

Return: success

# File rumix/registry.rb, line 41
                def store
                        if @install_path.kind_of?(String) then
                                PRIMARY_KEY.create(@sub_key) do |reg|
                                        reg['InstallPath'] = @install_path
                                end
                                return true
                        else
                                return false
                        end
                end
Also aliased as: save

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.