Class: Kreuzberg::Result::PageHierarchy
- Inherits:
-
Struct
- Object
- Struct
- Kreuzberg::Result::PageHierarchy
- Defined in:
- lib/kreuzberg/result.rb
Instance Attribute Summary collapse
-
#block_count ⇒ Integer
readonly
Number of hierarchy blocks.
-
#blocks ⇒ Array<HierarchicalBlock>
readonly
Hierarchical blocks.
Instance Method Summary collapse
Instance Attribute Details
#block_count ⇒ Integer (readonly)
Returns Number of hierarchy blocks.
127 128 129 130 131 |
# File 'lib/kreuzberg/result.rb', line 127 PageHierarchy = Struct.new(:block_count, :blocks, keyword_init: true) do def to_h { block_count: block_count, blocks: blocks.map(&:to_h) } end end |
#blocks ⇒ Array<HierarchicalBlock> (readonly)
Returns Hierarchical blocks.
127 128 129 130 131 |
# File 'lib/kreuzberg/result.rb', line 127 PageHierarchy = Struct.new(:block_count, :blocks, keyword_init: true) do def to_h { block_count: block_count, blocks: blocks.map(&:to_h) } end end |
Instance Method Details
#to_h ⇒ Object
128 129 130 |
# File 'lib/kreuzberg/result.rb', line 128 def to_h { block_count: block_count, blocks: blocks.map(&:to_h) } end |