Class: TrueClass

Inherits:
Object show all
Defined in:
lib/gooddata/extensions/true.rb

Overview

Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.

Instance Method Summary collapse

Instance Method Details

#duplicable?Boolean

+true+ is not duplicable:

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

Returns:

  • (Boolean)


12
13
14
# File 'lib/gooddata/extensions/true.rb', line 12

def duplicable?
  false
end

#to_bObject



16
17
18
# File 'lib/gooddata/extensions/true.rb', line 16

def to_b
  true
end

#to_iObject



20
21
22
# File 'lib/gooddata/extensions/true.rb', line 20

def to_i
  1
end