lib/bindata/choice.rb in bindata-1.2.1 vs lib/bindata/choice.rb in bindata-1.2.2
- old
+ new
@@ -143,50 +143,46 @@
def clear? #:nodoc:
current_choice.clear?
end
+ def assign(val)
+ current_choice.assign(val)
+ end
+
+ def snapshot
+ current_choice.snapshot
+ end
+
def respond_to?(symbol, include_private = false) #:nodoc:
current_choice.respond_to?(symbol, include_private) || super
end
def method_missing(symbol, *args, &block) #:nodoc:
current_choice.__send__(symbol, *args, &block)
end
- #---------------
- private
-
- def _do_read(io)
+ def do_read(io) #:nodoc:
trace_selection
current_choice.do_read(io)
end
- def trace_selection
- BinData::trace_message do |tracer|
- selection_string = eval_parameter(:selection).inspect
- tracer.trace_obj("#{debug_name}-selection-", selection_string)
- end
- end
-
- def _done_read
- current_choice.done_read
- end
-
- def _do_write(io)
+ def do_write(io) #:nodoc:
current_choice.do_write(io)
end
- def _do_num_bytes
+ def do_num_bytes #:nodoc:
current_choice.do_num_bytes
end
- def _assign(val)
- current_choice.assign(val)
- end
+ #---------------
+ private
- def _snapshot
- current_choice.snapshot
+ def trace_selection
+ BinData::trace_message do |tracer|
+ selection_string = eval_parameter(:selection).inspect
+ tracer.trace_obj("#{debug_name}-selection-", selection_string)
+ end
end
def current_choice
selection = eval_parameter(:selection)
if selection.nil?