Module: PagSeguro::Extensions::EnsureType

Instance Method Summary collapse

Instance Method Details

#ensure_type(klass, options = {}) ⇒ Object



4
5
6
# File 'lib/pagseguro/extensions/ensure_type.rb', line 4

def ensure_type(klass, options = {})
  options.kind_of?(klass) ? options : klass.new(options)
end