Class: Fixnum
Instance Method Summary collapse
- #ord ⇒ Object
-
#pluralize(s) ⇒ Object
hacking the english language.
- #to_character ⇒ Object
Instance Method Details
#ord ⇒ Object
411 412 413 |
# File 'lib/sup/util.rb', line 411 def ord self end |
#pluralize(s) ⇒ Object
hacking the english language
417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/sup/util.rb', line 417 def pluralize s to_s + " " + if self == 1 s else if s =~ /(.*)y$/ $1 + "ies" else s + "s" end end end |
#to_character ⇒ Object
402 403 404 405 406 407 408 |
# File 'lib/sup/util.rb', line 402 def to_character if self < 128 && self >= 0 chr else "<#{self}>" end end |