Class: Memo::Cli::Command::Custom
- Inherits:
-
Object
- Object
- Memo::Cli::Command::Custom
- Defined in:
- lib/memo/cli/command/custom.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(command, os: Memo::OS.new) ⇒ Custom
constructor
A new instance of Custom.
Constructor Details
#initialize(command, os: Memo::OS.new) ⇒ Custom
Returns a new instance of Custom.
5 6 7 8 9 10 11 |
# File 'lib/memo/cli/command/custom.rb', line 5 def initialize( command, os: Memo::OS.new ) @command = command @os = os end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/memo/cli/command/custom.rb', line 13 def call input = Memo::Alias::Command.new( @command, ).()&.split(" ") if input.nil? puts Error::Unknown.new.to_s puts Usage::Help.new.to_s return end Memo::Cli.new(input, os: @os).call end |