@@ -410,17 +410,11 @@ def compact! # :nodoc:
410
410
# See add_block! for options.
411
411
#
412
412
# Deprecated: originally accepted three params: `uri`, `base_uri` and `media_types`
413
- def load_uri! ( uri , options = { } , deprecated = nil )
413
+ def load_uri! ( uri , options = { } )
414
414
uri = Addressable ::URI . parse ( uri ) unless uri . respond_to? :scheme
415
415
416
416
opts = { base_uri : nil , media_types : :all }
417
-
418
- if options . is_a? Hash
419
- opts . merge! ( options )
420
- else
421
- opts [ :base_uri ] = options if options . is_a? String
422
- opts [ :media_types ] = deprecated if deprecated
423
- end
417
+ opts . merge! ( options )
424
418
425
419
if uri . scheme == 'file' or uri . scheme . nil?
426
420
uri . path = File . expand_path ( uri . path )
@@ -438,15 +432,9 @@ def load_uri!(uri, options = {}, deprecated = nil)
438
432
end
439
433
440
434
# Load a local CSS file.
441
- def load_file! ( file_name , options = { } , deprecated = nil )
435
+ def load_file! ( file_name , options = { } )
442
436
opts = { base_dir : nil , media_types : :all }
443
-
444
- if options . is_a? Hash
445
- opts . merge! ( options )
446
- else
447
- opts [ :base_dir ] = options if options . is_a? String
448
- opts [ :media_types ] = deprecated if deprecated
449
- end
437
+ opts . merge! ( options )
450
438
451
439
file_path = @options [ :file_resource ]
452
440
. find_file ( file_name , base_dir : opts [ :base_dir ] )
@@ -462,15 +450,9 @@ def load_file!(file_name, options = {}, deprecated = nil)
462
450
end
463
451
464
452
# Load a local CSS string.
465
- def load_string! ( src , options = { } , deprecated = nil )
453
+ def load_string! ( src , options = { } )
466
454
opts = { base_dir : nil , media_types : :all }
467
-
468
- if options . is_a? Hash
469
- opts . merge! ( options )
470
- else
471
- opts [ :base_dir ] = options if options . is_a? String
472
- opts [ :media_types ] = deprecated if deprecated
473
- end
455
+ opts . merge! ( options )
474
456
475
457
add_block! ( src , opts )
476
458
end
0 commit comments