Class: Fixnum
Instance Method Summary collapse
- #ord ⇒ Object
-
#pluralize(s) ⇒ Object
hacking the english language.
- #to_character ⇒ Object
Instance Method Details
#ord ⇒ Object
504 505 506 |
# File 'lib/sup/util.rb', line 504 def ord self end |
#pluralize(s) ⇒ Object
hacking the english language
510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/sup/util.rb', line 510 def pluralize s to_s + " " + if self == 1 s else if s =~ /(.*)y$/ $1 + "ies" else s + "s" end end end |
#to_character ⇒ Object
495 496 497 498 499 500 501 |
# File 'lib/sup/util.rb', line 495 def to_character if self < 128 && self >= 0 chr else "<#{self}>" end end |