Class: FreshBooks::XmlSerializer::BooleanSerializer
- Inherits:
-
Object
- Object
- FreshBooks::XmlSerializer::BooleanSerializer
- Defined in:
- lib/freshbooks/xml_serializer/serializers.rb
Class Method Summary collapse
Class Method Details
.to_node(member_name, value) ⇒ Object
58 59 60 61 62 |
# File 'lib/freshbooks/xml_serializer/serializers.rb', line 58 def self.to_node(member_name, value) element = REXML::Element.new(member_name) element.text = value ? '1' : '0' element end |
.to_value(xml_val) ⇒ Object
64 65 66 |
# File 'lib/freshbooks/xml_serializer/serializers.rb', line 64 def self.to_value(xml_val) xml_val.text.to_s == "1" end |