Sha256: 47390ca56d897df9fff4fb6156171604acb8d58488f6777c0c4706e55bf27533

Contents?: true

Size: 330 Bytes

Versions: 1

Compression:

Stored size: 330 Bytes

Contents

require 'facet/object/to_bool'
class Object
  # Alias for #to_bool. This one other classes
  # may redefine to suit their needs.
  #
  #   require 'facet/object/to_b'
  #
  #   "abc".to_b   #=> true
  #   true.to_b    #=> true
  #   false.to_b   #=> false
  #   nil.to_b     #=> false
  #  
  alias_method( :to_b, :to_bool )
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-0.6.3 lib/facet/object/to_b.rb