Class: TrueClass

Inherits:
Object show all
Defined in:
lib/platform_helpers/bool.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/platform_helpers/bool.rb', line 8

def empty?
  true
end

#to_boolObject



11
12
13
# File 'lib/platform_helpers/bool.rb', line 11

def to_bool
  return self
end

#to_display(params = {}) ⇒ Object



15
16
17
18
19
20
# File 'lib/platform_helpers/bool.rb', line 15

def to_display(params={})
  if params.has_key?(:na)
    return 'NA' if params[:na].to_bool
  end
  return 'Yes'
end