Module: LogCabin::Modules::Grep

Defined in:
lib/prospectus/modules/grep.rb

Overview

Pull state from a local file

Instance Method Summary collapse

Instance Method Details

#load!Object



8
9
10
11
12
13
# File 'lib/prospectus/modules/grep.rb', line 8

def load!
  raise('No file specified') unless @file
  @find ||= '.*'
  line = read_file
  @state.value = regex_helper(line)
end