Class: Object

Inherits:
BasicObject
Defined in:
lib/temporals/ruby_ext.rb

Instance Method Summary collapse

Instance Method Details

#in?(*arg) ⇒ Boolean

Returns:

  • (Boolean)


38
39
40
41
# File 'lib/temporals/ruby_ext.rb', line 38

def in?(*arg)
  arg = arg[0] if arg.length == 1 && arg[0].respond_to?(:include?)
  arg.include?(self)
end

#my_methodsObject



42
43
44
# File 'lib/temporals/ruby_ext.rb', line 42

def my_methods
  methods.sort - Object.methods
end

#value_in?(*arg) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/temporals/ruby_ext.rb', line 34

def value_in?(*arg)
  arg = arg[0] if arg.length == 1 && arg[0].respond_to?(:include_value?)
  arg.include_value?(self)
end