Class: Sutty::Cli::Commands::Container
- Inherits:
-
Sutty::Cli::Command
- Object
- Sutty::Cli::Command
- Sutty::Cli::Commands::Container
- Defined in:
- lib/sutty/cli/commands/container.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(name, options) ⇒ Container
constructor
A new instance of Container.
Methods inherited from Sutty::Cli::Command
#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which
Constructor Details
#initialize(name, options) ⇒ Container
Returns a new instance of Container.
12 13 14 15 |
# File 'lib/sutty/cli/commands/container.rb', line 12 def initialize(name, ) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/sutty/cli/commands/container.rb', line 10 def name @name end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/sutty/cli/commands/container.rb', line 17 def execute(input: $stdin, output: $stdout) cmd.run('git clone https://0xacab.org/sutty/containers/skel.git', name) Dir.chdir name do cmd.run('git remote rename origin upstream') cmd.run('git remote add origin', origin) cmd.run('git push -u origin master') end end |