Class: FalseClass

Inherits:
Object show all
Defined in:
activesupport/lib/active_support/core_ext/object/json.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

- (Object) as_json(options = nil)

:nodoc:



68
69
70
# File 'activesupport/lib/active_support/core_ext/object/json.rb', line 68

def as_json(options = nil) #:nodoc:
  self
end

- (true) blank?

false is blank:

false.blank? # => true

Returns:

  • (true)


65
66
67
# File 'activesupport/lib/active_support/core_ext/object/blank.rb', line 65

def blank?
  true
end

- (Boolean) duplicable?

false is not duplicable:

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

Returns:

  • (Boolean)


44
45
46
# File 'activesupport/lib/active_support/core_ext/object/duplicable.rb', line 44

def duplicable?
  false
end

- (Object) to_param

Returns self.



24
25
26
# File 'activesupport/lib/active_support/core_ext/object/to_param.rb', line 24

def to_param
  self
end