Class: Guides::Indexer
- Inherits:
-
Object
- Object
- Guides::Indexer
- Defined in:
- lib/guides/indexer.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#level_hash ⇒ Object
readonly
Returns the value of attribute level_hash.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(body, warnings, production = false) ⇒ Indexer
constructor
A new instance of Indexer.
Constructor Details
#initialize(body, warnings, production = false) ⇒ Indexer
Returns a new instance of Indexer.
9 10 11 12 13 14 |
# File 'lib/guides/indexer.rb', line 9 def initialize(body, warnings, production = false) @body = body @result = @body.dup @warnings = warnings @production = production end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/guides/indexer.rb', line 7 def body @body end |
#level_hash ⇒ Object (readonly)
Returns the value of attribute level_hash.
7 8 9 |
# File 'lib/guides/indexer.rb', line 7 def level_hash @level_hash end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
7 8 9 |
# File 'lib/guides/indexer.rb', line 7 def result @result end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
7 8 9 |
# File 'lib/guides/indexer.rb', line 7 def warnings @warnings end |
Instance Method Details
#index ⇒ Object
16 17 18 |
# File 'lib/guides/indexer.rb', line 16 def index @level_hash = process(body) end |