Method: Mushy::Pwd#process

Defined in:
lib/mushy/fluxs/pwd.rb

#process(event, config) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/mushy/fluxs/pwd.rb', line 54

def process event, config

  config[:command] = 'pwd'

  result = super event, config

  return result unless result[:success]

  pwd = result[:text].to_s.strip

  {
    pwd: Mushy::Ls.new.process({}, { path: pwd, directory_only: true })[0]
  }

end