sanitizeable?

sanitizeable?(text) Instance Public methods

sanitize

sanitize(text, options = {}) Instance Public methods

process_node

process_node(node, result, options) Instance Public methods

with_indifferent_access

with_indifferent_access() Instance Public methods Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: { a: 1 }.with_indifferent_access['a'] # => 1 nested_under_indifferent_access

transform_keys!

transform_keys!() Instance Public methods Destructively convert all keys using the block operations. Same as #transform_keys but modifies self.

transform_keys

transform_keys() Instance Public methods Returns a new hash with all keys converted using the block operation. hash = { name: 'Rob', age: '28' } hash.transform_keys{ |key| key.to_s.upcase } # => {"NAME"=>"Rob", "AGE"=>"28"}

to_xml

to_xml(options = {}) Instance Public methods Returns a string containing an XML representation of its receiver: { foo: 1, bar: 2 }.to_xml # => # <?xml version="1.0" encoding="UTF-8"?> # <hash> # <foo type="integer">1</foo> # <bar type="integer">2</bar> # </hash> To do so, the method loops over the pairs and builds nodes that depend on the values. Given a pair key, value: If value is a hash there's a recursive call with key as :root

to_query

to_query(namespace = nil) Instance Public methods Returns a string representation of the receiver suitable for use as a URL query string: {name: 'David', nationality: 'Danish'}.to_query # => "name=David&nationality=Danish" An optional namespace can be passed to enclose key names: {name: 'David', nationality: 'Danish'}.to_query('user') # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" The string pairs âkey=valueâ that conform the query string are sorted lexico

to_param

to_param(namespace = nil) Instance Public methods Alias for: to_query

to_options!

to_options!() Instance Public methods Alias for: symbolize_keys!