Class: OdaniaStaticPages::Config::Deploy::Rsync

Inherits:
Object
  • Object
show all
Defined in:
lib/odania_static_pages/config/rsync.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(targets: {green: '/tmp/rsync-deploy-test/blue', blue: '/tmp/rsync-deploy-test/blue'}, rsync_options: '-a --delete', state_file: '_current_state.yml') ⇒ Rsync

Returns a new instance of Rsync.



7
8
9
10
11
12
# File 'lib/odania_static_pages/config/rsync.rb', line 7

def initialize(targets: {green: '/tmp/rsync-deploy-test/blue', blue: '/tmp/rsync-deploy-test/blue'},
							 rsync_options: '-a --delete', state_file: '_current_state.yml')
	@targets = targets
	@rsync_options = rsync_options
	@state_file = state_file
end

Instance Attribute Details

#rsync_optionsObject (readonly)

Returns the value of attribute rsync_options.



5
6
7
# File 'lib/odania_static_pages/config/rsync.rb', line 5

def rsync_options
  @rsync_options
end

#state_fileObject (readonly)

Returns the value of attribute state_file.



5
6
7
# File 'lib/odania_static_pages/config/rsync.rb', line 5

def state_file
  @state_file
end

#targetsObject (readonly)

Returns the value of attribute targets.



5
6
7
# File 'lib/odania_static_pages/config/rsync.rb', line 5

def targets
  @targets
end

Instance Method Details

#to_hObject



14
15
16
17
18
19
20
# File 'lib/odania_static_pages/config/rsync.rb', line 14

def to_h
	{
		targets: @targets,
		rsync_options: @rsync_options,
		state_file: @state_file
	}.stringify_keys!
end