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

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object

:nodoc:



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

def as_json(options = nil) self end

#blank?Boolean

false is blank:

false.blank? # => true

Returns:

  • (Boolean)


58
59
60
# File 'activesupport/lib/active_support/core_ext/object/blank.rb', line 58

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

#encode_json(encoder) ⇒ Object

:nodoc:



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

def encode_json(encoder) to_s end

#to_paramObject



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

def to_param
  self
end