class Launchy::Argv
Ecapsulate the commandline argumens passed to Launchy
Attributes
argv[R]
Public Class Methods
new(*args)
click to toggle source
# File lib/launchy/argv.rb, line 9 def initialize(*args) @argv = args.flatten end
Public Instance Methods
==(other)
click to toggle source
# File lib/launchy/argv.rb, line 37 def ==(other) @argv == other.argv end
[](idx)
click to toggle source
# File lib/launchy/argv.rb, line 21 def [](idx) @argv[idx] end
blank?()
click to toggle source
# File lib/launchy/argv.rb, line 29 def blank? @argv.empty? || @argv.first.strip.empty? end
executable?()
click to toggle source
# File lib/launchy/argv.rb, line 33 def executable? ::Launchy::Application.find_executable(@argv.first) end
to_s()
click to toggle source
# File lib/launchy/argv.rb, line 13 def to_s @argv.join(" ") end
to_str()
click to toggle source
# File lib/launchy/argv.rb, line 17 def to_str to_s end
valid?()
click to toggle source
# File lib/launchy/argv.rb, line 25 def valid? !blank? && executable? end