Class: Migreazy::Action
- Inherits:
-
Object
- Object
- Migreazy::Action
- Defined in:
- lib/migreazy.rb
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(args) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(args) ⇒ Action
Returns a new instance of Action.
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/migreazy.rb', line 24 def initialize(args) @args = args if args.empty? @source1 = Source::Database.new @source2 = Source::WorkingCopy.new elsif args.size == 1 @source1 = Source::Database.new @source2 = Source.new_from_command_line_arg(args.first) elsif args.size == 2 @source1 = Source.new_from_command_line_arg(args.first) @source2 = Source.new_from_command_line_arg(args.last) end end |