Method: CodeRay::Encoders::Encoder.const_missing

Defined in:
lib/coderay/encoder.rb

.const_missing(sym) ⇒ Object

If FILE_EXTENSION isn’t defined, this method returns the downcase class name instead.



35
36
37
38
39
40
41
# File 'lib/coderay/encoder.rb', line 35

def const_missing sym
  if sym == :FILE_EXTENSION
    (defined?(@plugin_id) && @plugin_id || name[/\w+$/].downcase).to_s
  else
    super
  end
end