class Object

Public Instance Methods

isone?(val) click to toggle source
# File lib/dfxml/parser.rb, line 4
def isone?(val)
  # Return true if something is one (number or string).
  # Based on Python isone function packaged in fiwalk's dfxml.py
  # Unlike Python, we probably don't need to catch a TypeError exception.
  true ? val.to_i == 1 : false
end