Skip to content

Instantly share code, notes, and snippets.

Created February 22, 2013 05:43
Show Gist options
  • Save anonymous/5011016 to your computer and use it in GitHub Desktop.
Save anonymous/5011016 to your computer and use it in GitHub Desktop.
bla
require './lib/harddisk'
module ReImagEngine
class DiskImager
attr_reader :harddisks
attr_accessor :server_address,
:server_shared_type,
:server_share_name
# config shit here or even extract a config class
def initialize
# Initialize Configuration
# Initialize System Harddisks
# expect { expression }.to raise_error(ArgumentError)
`parted -lm`.split("\n").grep(/sd[a-z]/).map { |d| d.split(":").first }.each do |hdd|
harddisks.push HardDisk.new(hdd)
end
end
def harddisks
@harddisks || Array.new
end
private
def load_configuration
config = YAML.load_file('./config.yaml')
server_address = config['server']['server_address']
server_share_type = config['server']['server_share_type']
server_share_name = config['server']['server_share_name']
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment