Module: Wrnap::Global::Runner::ClassMethods

Defined in:
lib/wrnap/global/runner.rb

Instance Method Summary collapse

Instance Method Details

#exec_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/wrnap/global/runner.rb', line 10

def exec_exists?(name)
  !%x[which RNA#{name.to_s.downcase}].empty? || !%x[which #{name.to_s.downcase}].empty?
end

#exec_nameObject



14
15
16
# File 'lib/wrnap/global/runner.rb', line 14

def exec_name
  executable_name.respond_to?(:call) ? executable_name[self] : executable_name
end

#run(*data) ⇒ Object



18
19
20
21
# File 'lib/wrnap/global/runner.rb', line 18

def run(*data)
  flags = data.length > 1 && data.last.is_a?(Hash) ? data.pop : {}
  new(data).run(flags)
end