Class: Object

Inherits:
BasicObject
Includes:
DeepConstGet, Full, Tins::AskAndSend, Tins::Attempt, Tins::DeepDup, Tins::IfPredicate, Tins::Null::Kernel, Tins::P, Tins::RequireMaybe, Tins::Responding, Tins::To
Defined in:
lib/tins/xt/p.rb,
lib/tins/xt/to.rb,
lib/tins/xt/irb.rb,
lib/tins/xt/full.rb,
lib/tins/xt/null.rb,
lib/tins/xt/named.rb,
lib/tins/xt/attempt.rb,
lib/tins/xt/deep_dup.rb,
lib/tins/xt/responding.rb,
lib/tins/xt/ask_and_send.rb,
lib/tins/xt/if_predicate.rb,
lib/tins/xt/require_maybe.rb,
lib/tins/xt/deep_const_get.rb

Instance Method Summary collapse

Methods included from Tins::RequireMaybe

#require_maybe

Methods included from Tins::IfPredicate

#if?

Methods included from Tins::AskAndSend

#ask_and_send, #ask_and_send!

Methods included from Tins::Responding

#responding?

Methods included from Tins::DeepDup

#deep_dup

Methods included from Tins::Attempt

#attempt

Methods included from Tins::Null::Kernel

#Null

Methods included from Tins::To

#to

Instance Method Details

#examine(binding = TOPLEVEL_BINDING) ⇒ Object



19
20
21
# File 'lib/tins/xt/irb.rb', line 19

def examine(binding = TOPLEVEL_BINDING)
  IRB.examine(binding)
end

#named(name, method, *args, &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/tins/xt/named.rb', line 5

def named(name, method, *args, &named_block)
  extend Module.new {
    define_method(name) do |*rest, &block|
      block = named_block if named_block
      __send__(method, *(args + rest), &block)
    end
  }
end