Class: Huff::EncodingTableBuilder
- Inherits:
-
Object
- Object
- Huff::EncodingTableBuilder
- Defined in:
- lib/huff/encoding_table_builder.rb
Instance Method Summary collapse
-
#initialize(tree) ⇒ EncodingTableBuilder
constructor
A new instance of EncodingTableBuilder.
- #table ⇒ Object
Constructor Details
#initialize(tree) ⇒ EncodingTableBuilder
Returns a new instance of EncodingTableBuilder.
3 4 5 |
# File 'lib/huff/encoding_table_builder.rb', line 3 def initialize(tree) @tree = tree end |
Instance Method Details
#table ⇒ Object
7 8 9 |
# File 'lib/huff/encoding_table_builder.rb', line 7 def table Hash[create_table(@tree, '')] end |