Class: NilClass
- Defined in:
- lib/ruby-rails-extensions/extensions/to_x.rb,
lib/ruby-rails-extensions/extensions/yesno.rb,
lib/ruby-rails-extensions/extensions/to_dec.rb,
lib/ruby-rails-extensions/extensions/to_bool.rb,
lib/ruby-rails-extensions/extensions/usd_to_f.rb,
lib/ruby-rails-extensions/extensions/usd_to_i.rb,
lib/ruby-rails-extensions/extensions/to_sort_i.rb,
lib/ruby-rails-extensions/extensions/to_nonzero_i.rb,
lib/ruby-rails-extensions/extensions/to_negative_i.rb,
lib/ruby-rails-extensions/extensions/to_positive_i.rb
Instance Method Summary collapse
-
#to_bool ⇒ Object
:nodoc:.
-
#to_dec(*_args) ⇒ Object
:nodoc:.
-
#to_negative_i ⇒ Nil
Calls ‘to_i` and returns the value if it is negative.
-
#to_nonzero_i ⇒ Integer, Nil
Calls ‘to_i` and returns the value if it is nonzero.
-
#to_positive_i ⇒ Integer, Nil
Calls ‘to_i` and returns the value if it is positive.
-
#to_sort_i ⇒ Object
:nodoc:.
-
#to_x(unless_true = nil) ⇒ Object
:nodoc:.
-
#usd_to_f ⇒ Object
:nodoc:.
-
#usd_to_i ⇒ Object
:nodoc:.
-
#yesno ⇒ Object
:nodoc:.
Instance Method Details
#to_bool ⇒ Object
:nodoc:
21 22 23 |
# File 'lib/ruby-rails-extensions/extensions/to_bool.rb', line 21 def to_bool false end |
#to_dec(*_args) ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/ruby-rails-extensions/extensions/to_dec.rb', line 5 def to_dec(*_args) nil end |
#to_negative_i ⇒ Nil
Calls ‘to_i` and returns the value if it is negative
36 37 38 |
# File 'lib/ruby-rails-extensions/extensions/to_negative_i.rb', line 36 def to_negative_i nil end |
#to_nonzero_i ⇒ Integer, Nil
Calls ‘to_i` and returns the value if it is nonzero
36 37 38 |
# File 'lib/ruby-rails-extensions/extensions/to_nonzero_i.rb', line 36 def to_nonzero_i nil end |
#to_positive_i ⇒ Integer, Nil
Calls ‘to_i` and returns the value if it is positive
36 37 38 |
# File 'lib/ruby-rails-extensions/extensions/to_positive_i.rb', line 36 def to_positive_i nil end |
#to_sort_i ⇒ Object
:nodoc:
19 20 21 |
# File 'lib/ruby-rails-extensions/extensions/to_sort_i.rb', line 19 def to_sort_i -1 end |
#to_x(unless_true = nil) ⇒ Object
:nodoc:
19 20 21 |
# File 'lib/ruby-rails-extensions/extensions/to_x.rb', line 19 def to_x(unless_true = nil) unless_true end |
#usd_to_f ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/ruby-rails-extensions/extensions/usd_to_f.rb', line 5 def usd_to_f nil end |
#usd_to_i ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/ruby-rails-extensions/extensions/usd_to_i.rb', line 5 def usd_to_i nil end |
#yesno ⇒ Object
:nodoc:
19 20 21 |
# File 'lib/ruby-rails-extensions/extensions/yesno.rb', line 19 def yesno 'N/A' end |