module CSL

Some methods in this file are taken from ActiveSupport and are copyright © 2005-2010 David Heinemeier Hansson. They are loaded only if ActiveSupport is not present.

Constants

VERSION
XML_ENTITY_SUBSTITUTION

Public Instance Methods

encode_xml_attr(string) click to toggle source
# File lib/csl/compatibility.rb, line 41
def encode_xml_attr(string)
  string.gsub(/[&<>'"]/) { |match|
    XML_ENTITY_SUBSTITUTION[match]
  }.inspect
end
encode_xml_text(string) click to toggle source
# File lib/csl/compatibility.rb, line 35
def encode_xml_text(string)
  string.gsub(/[&<>]/) { |match|
    XML_ENTITY_SUBSTITUTION[match]
  }
end
parse(*arguments) click to toggle source
# File lib/csl.rb, line 53
def parse(*arguments)
  Parser.instance.parse(*arguments)
end
parse!(*arguments) click to toggle source
# File lib/csl.rb, line 57
def parse!(*arguments)
  Parser.instance.parse!(*arguments)
end
silence_warnings() { || ... } click to toggle source
# File lib/csl/compatibility.rb, line 4
def silence_warnings
  original_verbosity, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = original_verbosity
end
valid?(node) click to toggle source
# File lib/csl.rb, line 65
def valid?(node)
  Schema.valid?(node)
end
validate(node) click to toggle source
# File lib/csl.rb, line 61
def validate(node)
  Schema.validate(node)
end