Class: Mj::Git::Commands::CheckoutCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/mj/git/commands/checkout_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branch:, options: {}) ⇒ CheckoutCommand

Returns a new instance of CheckoutCommand.



9
10
11
12
# File 'lib/mj/git/commands/checkout_command.rb', line 9

def initialize(branch:, options: {})
  @branch = branch
  @options = options
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



7
8
9
# File 'lib/mj/git/commands/checkout_command.rb', line 7

def branch
  @branch
end

Instance Method Details

#dry_run?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/mj/git/commands/checkout_command.rb', line 14

def dry_run?
  @options[:dry_run]
end