class Tilt::FinalizedMapping
Private internal class for finalized mappings, which are frozen and cannot be modified.
Public Class Methods
Source
# File lib/tilt/mapping.rb 374 def initialize(template_map) 375 @template_map = template_map 376 freeze 377 end
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.
Public Instance Methods
Source
# File lib/tilt/mapping.rb 385 def clone(freeze: false) 386 self 387 end
Returns receiver, since instances are always frozen.
Source
# File lib/tilt/mapping.rb 380 def dup 381 self 382 end
Returns receiver, since instances are always frozen.
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
Returns an aarry of all extensions the template class will be used for.
Source
# File lib/tilt/mapping.rb 390 def registered?(ext) 391 @template_map.has_key?(ext.downcase) 392 end
Return whether the given file extension has been registered.