Class: Shard::CLI::Fork
- Inherits:
-
Object
- Object
- Shard::CLI::Fork
- Defined in:
- lib/shard/cli/fork.rb
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
# Declarations # #.
Class Method Summary collapse
-
.run(shard_line) ⇒ Object
# Class Methods # #.
Instance Method Summary collapse
-
#initialize(shard_line) ⇒ Fork
constructor
# Constructor # #.
-
#run ⇒ Object
# Instance Methods # #.
Constructor Details
Instance Attribute Details
#ref ⇒ Object (readonly)
# Declarations #
#
11 12 13 |
# File 'lib/shard/cli/fork.rb', line 11 def ref @ref end |
Class Method Details
.run(shard_line) ⇒ Object
# Class Methods #
#
29 30 31 |
# File 'lib/shard/cli/fork.rb', line 29 def self.run(shard_line) new(shard_line).run end |
Instance Method Details
#run ⇒ Object
# Instance Methods #
#
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/shard/cli/fork.rb', line 39 def run if ref.nil? puts "That is not a valid shard reference." return end if Shard::Credentials.saved? && Shard::Credentials.valid? fork_shard else puts "You are not currently logged into Github." Shard::CLI::Config.run if Shard::Credentials.saved? run end end end |