Class: Gitflash::Cli

Inherits:
Thor
  • Object
show all
Extended by:
Gitflash::Configuration::Descriptions
Defined in:
lib/gitflash/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gitflash::Configuration::Descriptions

descriptions

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/gitflash/cli.rb', line 9

def self.exit_on_failure?
  true
end

Instance Method Details

#checkoutObject



16
17
18
# File 'lib/gitflash/cli.rb', line 16

def checkout
  branches? ? checkout_branch : prompt.ok('You only have one branch!')
end

#deleteObject



23
24
25
# File 'lib/gitflash/cli.rb', line 23

def delete
  branches? ? delete_branch : prompt.ok('You only have one branch!')
end

#resetObject



31
32
33
# File 'lib/gitflash/cli.rb', line 31

def reset
  commits? ? reset_to_commit : prompt.ok('You only have one branch!')
end