Method: BinData::SanitizedParameters#initialize
- Defined in:
- lib/bindata/sanitize.rb
#initialize(parameters, the_class, hints) ⇒ SanitizedParameters
Returns a new instance of SanitizedParameters.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/bindata/sanitize.rb', line 194 def initialize(parameters, the_class, hints) parameters.each_pair { |key, value| self[key.to_sym] = value } @the_class = the_class if hints[:endian] self[:endian] ||= hints[:endian] end if hints[:search_prefix] self[:search_prefix] = Array(self[:search_prefix]).concat(Array(hints[:search_prefix])) end sanitize! end |