Top Level Namespace
Defined Under Namespace
Modules: Dfxml
Instance Method Summary collapse
Instance Method Details
#isone?(val) ⇒ Boolean
4 5 6 7 8 9 |
# 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 |