Module: Useful::RubyExtensions::TrueClass
- Included in:
- TrueClass
- Defined in:
- lib/useful/ruby_extensions/true_class.rb
Instance Method Summary collapse
- #to_affirmative(abbreviate = false) ⇒ Object (also: #to_casual_s)
- #to_boolean ⇒ Object
- #to_i ⇒ Object
Instance Method Details
#to_affirmative(abbreviate = false) ⇒ Object Also known as: to_casual_s
6 7 8 |
# File 'lib/useful/ruby_extensions/true_class.rb', line 6 def to_affirmative(abbreviate=false) abbreviate ? "Y" : "Yes" end |
#to_boolean ⇒ Object
15 16 17 |
# File 'lib/useful/ruby_extensions/true_class.rb', line 15 def to_boolean true end |
#to_i ⇒ Object
11 12 13 |
# File 'lib/useful/ruby_extensions/true_class.rb', line 11 def to_i 1 end |