Sha256: f06a734235fb1d81fb117710636a1030c0eebc779ef8090039800a815c602406

Contents?: true

Size: 532 Bytes

Versions: 178

Compression:

Stored size: 532 Bytes

Contents

class Object
  # Can you safely .dup this object?
  # False for nil, false, true, symbols, and numbers; true otherwise.
  def duplicable?
    true
  end
end

class NilClass #:nodoc:
  def duplicable?
    false
  end
end

class FalseClass #:nodoc:
  def duplicable?
    false
  end
end

class TrueClass #:nodoc:
  def duplicable?
    false
  end
end

class Symbol #:nodoc:
  def duplicable?
    false
  end
end

class Numeric #:nodoc:
  def duplicable?
    false
  end
end

class Class #:nodoc:
  def duplicable?
    false
  end
end

Version data entries

178 entries across 145 versions & 25 rubygems

Version Path
couch_tomato-0.1.2 lib/core_ext/duplicable.rb
couch_tomato-0.1.1 lib/core_ext/duplicable.rb
dsl_accessor-0.3.3 core_ext/duplicable.rb
couch_tomato-0.1.0 lib/core_ext/duplicable.rb
activeobject-0.0.3 ./lib/active_support/core_ext/duplicable.rb
activeobject-0.0.4 ./lib/active_support/core_ext/duplicable.rb
activesupport-2.2.3 lib/active_support/core_ext/duplicable.rb
webroar-0.2.2 src/admin_panel/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.8.1 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
activesupport-2.3.4 lib/active_support/core_ext/duplicable.rb
ant-mapper-0.0.2 ./lib/ant_support/core_ext/duplicable.rb
activesupport-2.3.3 lib/active_support/core_ext/duplicable.rb
activesupport-2.2.2 lib/active_support/core_ext/duplicable.rb
activesupport-2.3.2 lib/active_support/core_ext/duplicable.rb
mack-active_record-0.8.2 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb
mack-facets-0.8.3 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb
mack-facets-0.8.3.1 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb
radiant-0.8.0 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb