Class: Backsum::Server::Dsl

Inherits:
Object
  • Object
show all
Defined in:
lib/backsum/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, options = {}, &block) ⇒ Dsl

Returns a new instance of Dsl.



75
76
77
78
79
80
81
82
# File 'lib/backsum/server.rb', line 75

def initialize(host, options = {}, &block)
  self.instance = Server.new
  self.instance.host = host
  self.instance.local = options[:local]
  self.instance.username = options[:username]
  
  instance_eval(&block) if block
end

Instance Attribute Details

#instanceObject

Returns the value of attribute instance.



73
74
75
# File 'lib/backsum/server.rb', line 73

def instance
  @instance
end

Instance Method Details

#folder(path, options = {}) ⇒ Object



84
85
86
# File 'lib/backsum/server.rb', line 84

def folder(path, options = {})
  self.instance.folders[path] = options
end