Class: OdaniaStaticPages::Config::Deploy::Rsync
- Inherits:
-
Object
- Object
- OdaniaStaticPages::Config::Deploy::Rsync
- Defined in:
- lib/odania_static_pages/config/rsync.rb
Instance Attribute Summary collapse
-
#rsync_options ⇒ Object
readonly
Returns the value of attribute rsync_options.
-
#state_file ⇒ Object
readonly
Returns the value of attribute state_file.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
Instance Method Summary collapse
-
#initialize(targets: {green: '/tmp/rsync-deploy-test/blue', blue: '/tmp/rsync-deploy-test/blue'}, rsync_options: '-a --delete', state_file: '_current_state.yml') ⇒ Rsync
constructor
A new instance of Rsync.
- #to_h ⇒ Object
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 = @state_file = state_file end |
Instance Attribute Details
#rsync_options ⇒ Object (readonly)
Returns the value of attribute rsync_options.
5 6 7 |
# File 'lib/odania_static_pages/config/rsync.rb', line 5 def @rsync_options end |
#state_file ⇒ Object (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 |
#targets ⇒ Object (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_h ⇒ Object
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 |