Class: TrueClass

Inherits:
Object show all
Defined in:
motion/core_ext/object/blank.rb,
motion/core_ext/object/to_json.rb,
motion/core_ext/object/to_param.rb,
motion/core_ext/object/duplicable.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

true is not blank:

true.blank? # => false

Returns:

  • (Boolean)


64
65
66
# File 'motion/core_ext/object/blank.rb', line 64

def blank?
  false
end

#duplicable?Boolean

true is not duplicable:

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

Returns:

  • (Boolean)


54
55
56
# File 'motion/core_ext/object/duplicable.rb', line 54

def duplicable?
  false
end

#to_jsonObject

Returns self as string.



26
27
28
# File 'motion/core_ext/object/to_json.rb', line 26

def to_json
  self.to_s
end

#to_paramObject

Returns self.



17
18
19
# File 'motion/core_ext/object/to_param.rb', line 17

def to_param
  self
end