Class: Hayde::Indexer

Inherits:
Object
  • Object
show all
Defined in:
lib/hayde/indexer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, warnings) ⇒ Indexer

Returns a new instance of Indexer.



8
9
10
11
12
# File 'lib/hayde/indexer.rb', line 8

def initialize(body, warnings)
  @body     = body
  @result   = @body.dup
  @warnings = warnings
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/hayde/indexer.rb', line 6

def body
  @body
end

#level_hashObject (readonly)

Returns the value of attribute level_hash.



6
7
8
# File 'lib/hayde/indexer.rb', line 6

def level_hash
  @level_hash
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/hayde/indexer.rb', line 6

def result
  @result
end

#warningsObject (readonly)

Returns the value of attribute warnings.



6
7
8
# File 'lib/hayde/indexer.rb', line 6

def warnings
  @warnings
end

Instance Method Details

#indexObject



14
15
16
# File 'lib/hayde/indexer.rb', line 14

def index
  @level_hash = process(body)
end