Class | REXMLUtilityNode |
In: |
lib/extlib/hash.rb
|
Parent: | Object |
This is a slighly modified version of the XMLUtilityNode from merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com) It‘s mainly just adding vowels, as I ht cd wth n vwls :) This represents the hard part of the work, all I did was change the underlying parser.
attributes | [RW] | |
children | [RW] | |
name | [RW] | |
type | [RW] |
Convert basic XML entities into their literal values.
@param value<gsub> An XML fragment.
@return [gsub] The XML fragment after converting entities.
Typecasts a value based upon its type. For instance, if node has type == "integer", {{[node.typecast_value("12") #=> 12]}}
@param value<String> The value that is being typecast.
@details [:type options]
"integer":: converts +value+ to an integer with #to_i "boolean":: checks whether +value+, after removing spaces, is the literal "true" "datetime":: Parses +value+ using Time.parse, and returns a UTC Time "date":: Parses +value+ using Date.parse
@return [Integer, Boolean, Time, Date, Object]
The result of typecasting +value+.
@note
If +self+ does not have a "type" key, or if it's not one of the options specified above, the raw +value+ will be returned.