Class: Noir::Command::Format::LGTM

Inherits:
Base::TerminalCommand show all
Defined in:
lib/noir/command/format/lgtm.rb

Class Method Summary collapse

Methods inherited from Base::TerminalCommand

sub_commands

Methods inherited from Base::Command

check_command_not_found, description, sub_commands

Class Method Details

.execute(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/noir/command/format/lgtm.rb', line 6

def self.execute *args
  raise 'URL Missing. Please input a link in argument.'if args.empty?
  url = args.first

  if URI.regexp.match(url)
    puts "[![LGTM](#{url})](#{url})"
  else
    puts "Argument '#{url}' is not URL."
  end

end