Class: BinaryBlocker::Blocker
- Inherits:
-
GroupEncoder
- Object
- Encoder
- GroupEncoder
- BinaryBlocker::Blocker
- Defined in:
- lib/blocker.rb
Instance Method Summary collapse
Methods inherited from GroupEncoder
attributes, attributes=, #block, clear_registered_klasses, #clone, #deblock, has_bit_field, has_counted_array, has_fixed_array, has_list_of, has_one, has_one_of, include_klasses, inherited, #initialize, keys, klasses, klasses=, lookup, lookup=, #method_missing, #orig_clone, register_klass, #to_h, #valid?, #value, #value=
Methods inherited from Encoder
#block, #deblock, #initialize, #key_value?, #me
Constructor Details
This class inherits a constructor from BinaryBlocker::GroupEncoder
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BinaryBlocker::GroupEncoder
Instance Method Details
#inspect ⇒ Object
1070 1071 1072 1073 1074 1075 1076 |
# File 'lib/blocker.rb', line 1070 def inspect result = [] @lookup.keys.sort_by {|k| @lookup[k]}.each do |k| result << [k, @value[@lookup[k]]] end "#{self.class}: #{result.inspect}" end |
#pretty_print(obj) ⇒ Object
1078 1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/blocker.rb', line 1078 def pretty_print(obj) result = [] @lookup.keys.sort_by {|k| @lookup[k]}.each do |k| result << [k, @value[@lookup[k]]] end obj.text self.class.to_s obj.text ": " result.pretty_print(obj) end |