lib/bindata/wrapper.rb in bindata-0.11.1 vs lib/bindata/wrapper.rb in bindata-1.0.0
- old
+ new
@@ -30,23 +30,24 @@
def endian(endian = nil)
@endian ||= nil
if [:little, :big].include?(endian)
@endian = endian
elsif endian != nil
- raise ArgumentError, "unknown value for endian '#{endian}'", caller(1)
+ raise ArgumentError,
+ "unknown value for endian '#{endian}' in #{self}", caller(1)
end
@endian
end
- def method_missing(symbol, *args)
+ def method_missing(symbol, *args) #:nodoc:
type = symbol
params = args.length == 0 ? {} : args[0]
set_wrapped(type, params)
end
- def sanitize_parameters!(params, sanitizer)
+ def sanitize_parameters!(params, sanitizer) #:nodoc:
raise "Nothing to wrap" unless defined? @wrapped
wrapped_type, wrapped_params = @wrapped
wrapped_params = wrapped_params.dup
@@ -79,31 +80,23 @@
prototype = get_parameter(:wrapped)
@wrapped = prototype.instantiate(self)
end
- def clear
+ def clear #:nodoc:
wrapped.clear
end
- def clear?
+ def clear? #:nodoc:
wrapped.clear?
end
- def debug_name_of(child)
- debug_name
- end
-
- def offset_of(child)
- offset
- end
-
- def respond_to?(symbol, include_private = false)
+ def respond_to?(symbol, include_private = false) #:nodoc:
super || wrapped.respond_to?(symbol, include_private)
end
- def method_missing(symbol, *args, &block)
+ def method_missing(symbol, *args, &block) #:nodoc:
wrapped.__send__(symbol, *args, &block)
end
#---------------
private
@@ -122,11 +115,11 @@
def _do_write(io)
wrapped.do_write(io)
end
- def _do_num_bytes(deprecated)
- wrapped.do_num_bytes(deprecated)
+ def _do_num_bytes
+ wrapped.do_num_bytes
end
def _assign(val)
wrapped.assign(val)
end