Private internal class for finalized mappings, which are frozen and cannot be modified.
Public Class methods
new(template_map)
Set the template map to use. The template map should already be frozen, but this is an internal class, so it does not explicitly check for that.
[show source]
# File lib/tilt/mapping.rb 374 def initialize(template_map) 375 @template_map = template_map 376 freeze 377 end
Public Instance methods
clone(freeze: false)
Returns receiver, since instances are always frozen.
[show source]
# File lib/tilt/mapping.rb 385 def clone(freeze: false) 386 self 387 end
dup()
Returns receiver, since instances are always frozen.
[show source]
# File lib/tilt/mapping.rb 380 def dup 381 self 382 end
extensions_for(template_class)
Returns an aarry of all extensions the template class will be used for.
[show source]
# File lib/tilt/mapping.rb 396 def extensions_for(template_class) 397 res = [] 398 @template_map.each do |ext, klass| 399 res << ext if template_class == klass 400 end 401 res.uniq! 402 res 403 end
registered?(ext)
Return whether the given file extension has been registered.
[show source]
# File lib/tilt/mapping.rb 390 def registered?(ext) 391 @template_map.has_key?(ext.downcase) 392 end