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.
611 612 613 614 615 616 |
# File 'lib/kreuzberg/config.rb', line 611 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.
609 610 611 |
# File 'lib/kreuzberg/config.rb', line 609 def enabled @enabled end |
#preset ⇒ Object (readonly)
Returns the value of attribute preset.
609 610 611 |
# File 'lib/kreuzberg/config.rb', line 609 def preset @preset end |
#remove_forms ⇒ Object (readonly)
Returns the value of attribute remove_forms.
609 610 611 |
# File 'lib/kreuzberg/config.rb', line 609 def remove_forms @remove_forms end |
#remove_navigation ⇒ Object (readonly)
Returns the value of attribute remove_navigation.
609 610 611 |
# File 'lib/kreuzberg/config.rb', line 609 def @remove_navigation end |
Instance Method Details
#to_h ⇒ Object
618 619 620 621 622 623 624 625 |
# File 'lib/kreuzberg/config.rb', line 618 def to_h { enabled: @enabled, preset: @preset, remove_navigation: @remove_navigation, remove_forms: @remove_forms }.compact end |