Class | BinaryBlocker::SimpleEncoder |
In: |
lib/blocker.rb
|
Parent: | Encoder |
# File lib/blocker.rb, line 334 334: def self.register(sym, fmt, *opts) 335: klass = Class.new(SimpleEncoder) 336: klass.send(:define_method,:initialize) do |*opts| 337: initialize_options(*opts) 338: 339: @format = fmt 340: @length = BinaryBlocker.sizeof_format(@format) 341: 342: @key = @opts[:key] 343: @valid = @opts[:valid] 344: 345: initialize_data(*opts) 346: end 347: BinaryBlocker.register_klass(sym, klass) 348: end
# File lib/blocker.rb, line 368 368: def inspect 369: "SE: #{self.class} - #{@format} - #{@length} - #{self.value.inspect}" 370: end