Class: Sprinkle::Commands::Transfer
- Defined in:
- lib/sprinkle/commands/transfer.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #eql?(a, b) ⇒ Boolean
-
#initialize(source, destination, opts = {}) ⇒ Transfer
constructor
A new instance of Transfer.
- #inspect ⇒ Object
- #recursive? ⇒ Boolean
Methods inherited from Command
Constructor Details
#initialize(source, destination, opts = {}) ⇒ Transfer
Returns a new instance of Transfer.
7 8 9 10 11 |
# File 'lib/sprinkle/commands/transfer.rb', line 7 def initialize(source, destination, opts={}) @source = source @destination = destination @opts = opts end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
5 6 7 |
# File 'lib/sprinkle/commands/transfer.rb', line 5 def destination @destination end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
5 6 7 |
# File 'lib/sprinkle/commands/transfer.rb', line 5 def opts @opts end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/sprinkle/commands/transfer.rb', line 5 def source @source end |
Instance Method Details
#eql?(a, b) ⇒ Boolean
21 22 23 24 25 |
# File 'lib/sprinkle/commands/transfer.rb', line 21 def eql?(a,b) a.source == b.source && a.destionation == b.destination && a.opts == b.opts end |
#inspect ⇒ Object
17 18 19 |
# File 'lib/sprinkle/commands/transfer.rb', line 17 def inspect ":TRANSFER, src: #{source}, dest: #{destination}, opts: #{@opts.inspect}" end |
#recursive? ⇒ Boolean
13 14 15 |
# File 'lib/sprinkle/commands/transfer.rb', line 13 def recursive? !!@opts[:recursive] end |