Class: Kreuzberg::Config::HtmlPreprocessing
- Inherits:
-
Object
- Object
- Kreuzberg::Config::HtmlPreprocessing
- Defined in:
- lib/kreuzberg/config.rb
Overview
HTML preprocessing configuration for content extraction
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#preset ⇒ Object
readonly
Returns the value of attribute preset.
-
#remove_forms ⇒ Object
readonly
Returns the value of attribute remove_forms.
-
#remove_navigation ⇒ Object
readonly
Returns the value of attribute remove_navigation.
Instance Method Summary collapse
-
#initialize(enabled: nil, preset: nil, remove_navigation: nil, remove_forms: nil) ⇒ HtmlPreprocessing
constructor
A new instance of HtmlPreprocessing.
- #to_h ⇒ Object
Constructor Details
#initialize(enabled: nil, preset: nil, remove_navigation: nil, remove_forms: nil) ⇒ HtmlPreprocessing
Returns a new instance of HtmlPreprocessing.
607 608 609 610 611 612 |
# File 'lib/kreuzberg/config.rb', line 607 def initialize(enabled: nil, preset: nil, remove_navigation: nil, remove_forms: nil) @enabled = boolean_or_nil(enabled) @preset = preset&.to_sym @remove_navigation = boolean_or_nil() @remove_forms = boolean_or_nil(remove_forms) end |
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
605 606 607 |
# File 'lib/kreuzberg/config.rb', line 605 def enabled @enabled end |
#preset ⇒ Object (readonly)
Returns the value of attribute preset.
605 606 607 |
# File 'lib/kreuzberg/config.rb', line 605 def preset @preset end |
#remove_forms ⇒ Object (readonly)
Returns the value of attribute remove_forms.
605 606 607 |
# File 'lib/kreuzberg/config.rb', line 605 def remove_forms @remove_forms end |
#remove_navigation ⇒ Object (readonly)
Returns the value of attribute remove_navigation.
605 606 607 |
# File 'lib/kreuzberg/config.rb', line 605 def @remove_navigation end |
Instance Method Details
#to_h ⇒ Object
614 615 616 617 618 619 620 621 |
# File 'lib/kreuzberg/config.rb', line 614 def to_h { enabled: @enabled, preset: @preset, remove_navigation: @remove_navigation, remove_forms: @remove_forms }.compact end |