method

screen_data

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: XSD::XSDBoolean
screen_data(value) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/xsd/datatypes.rb, line 213
  def screen_data(value)
    if value.is_a?(String)
      str = value.strip
      if str == 'true' || str == '1'
        true
      elsif str == 'false' || str == '0'
        false
      else
        raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.")
      end
    else
      value ? true : false
    end
  end
Register or log in to add new notes.