File: legacy.rb

package info (click to toggle)
libhtmlentities-ruby 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 136 kB
  • ctags: 294
  • sloc: ruby: 2,172; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 616 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class HTMLEntities
  class << self
    
    #
    # Legacy compatibility class method allowing direct encoding of XHTML1 entities.
    # See HTMLEntities#encode for description of parameters.
    #
    def encode_entities(*args)
      xhtml1_entities.encode(*args)
    end
    
    #
    # Legacy compatibility class method allowing direct decoding of XHTML1 entities.
    # See HTMLEntities#decode for description of parameters.
    #
    def decode_entities(*args)
      xhtml1_entities.decode(*args)
    end
    
  private
  
    def xhtml1_entities
      @xhtml1_entities ||= new('xhtml1')
    end
    
  end
end