Class: FalseClass

Inherits:
Object show all
Defined in:
activesupport/lib/active_support/json/encoding.rb,
activesupport/lib/active_support/core_ext/object/blank.rb,
activesupport/lib/active_support/core_ext/object/to_param.rb,
activesupport/lib/active_support/core_ext/object/duplicable.rb

Constant Summary collapse

AS_JSON =
ActiveSupport::JSON::Variable.new('false').freeze

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object

:nodoc:



170
# File 'activesupport/lib/active_support/json/encoding.rb', line 170

def as_json(options = nil) AS_JSON end

#blank?Boolean

false is blank:

false.blank? # => true

Returns:

  • (Boolean)


55
56
57
# File 'activesupport/lib/active_support/core_ext/object/blank.rb', line 55

def blank?
  true
end

#duplicable?Boolean

false is not duplicable:

false.duplicable? # => false
false.dup         # => TypeError: can't dup FalseClass

Returns:

  • (Boolean)


46
47
48
# File 'activesupport/lib/active_support/core_ext/object/duplicable.rb', line 46

def duplicable?
  false
end

#to_paramObject



21
22
23
# File 'activesupport/lib/active_support/core_ext/object/to_param.rb', line 21

def to_param
  self
end