Class: Plog::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/plog/parser.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/plog/parser.rb', line 7

def data
  @data
end

Class Method Details

.crunch(data) ⇒ Object



12
13
14
# File 'lib/plog/parser.rb', line 12

def crunch data
  load_data data
end

.is_candidate?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/plog/parser.rb', line 22

def is_candidate?
  raise 'You must implement a is_candidate? method in your tokenizer class'
end

.load_data(value) ⇒ Object



16
17
18
19
20
# File 'lib/plog/parser.rb', line 16

def load_data(value)
  reset
  @data = value
  self
end

.resetObject



9
10
# File 'lib/plog/parser.rb', line 9

def reset
end