class Object

Constants

Nothing
NothingClass

Public Class Methods

new() click to toggle source
# File lib/r_kit/override/perfs.rb, line 63
def initialize
  @a = "a"
  @x = "x"
end

Public Instance Methods

Nothing(value) click to toggle source
# File lib/r_kit/utility/main_extend.rb, line 20
def Nothing(value)
  value || Nothing
end
__olddef__a()
Alias for: a
__olddef__x()
Alias for: x
a() click to toggle source
# File lib/r_kit/override/perfs.rb, line 7
def a() "a" end
Also aliased as: __olddef__a, __olddef__a
fetch(statement = nil, value = nil, &block) click to toggle source

TODO: return self if statement (or block), else, return “value”

# File lib/r_kit/utility/object_extend.rb, line 10
def fetch statement = nil, value = nil, &block
  state(statement, &block) ? self : value
end
need_decoration?() click to toggle source
# File lib/r_kit/decoration/object_extend.rb, line 3
def need_decoration?() false end
reverse_fetch(statement = nil, value = nil, &block) click to toggle source
# File lib/r_kit/utility/object_extend.rb, line 14
def reverse_fetch statement = nil, value = nil, &block
  !state(statement, &block) ? self : value
end
state(statement = nil, &block) click to toggle source
# File lib/r_kit/utility/object_extend.rb, line 18
def state statement = nil, &block
  if statement
    case self
    when statement
      true
    else
      false
    end
  elsif block_given?
    !!block.call(self)
  else
    raise ArgumentError, 'Must send either "statement" or "&block" argument.'
  end
end
x() click to toggle source
# File lib/r_kit/override/perfs.rb, line 14
def x() "x" end
Also aliased as: __olddef__x, __olddef__x