module Oga::EntityDecoder
Public Class Methods
decode(input, html = false)
click to toggle source
@param [String] input @param [TrueClass|FalseClass] html @return [String]
# File lib/oga/entity_decoder.rb, line 11 def self.decode(input, html = false) decoder = html ? HTML::Entities : XML::Entities decoder.decode(input) end
try_decode(input, html = false)
click to toggle source
@see [decode]
# File lib/oga/entity_decoder.rb, line 4 def self.try_decode(input, html = false) input ? decode(input, html) : nil end