Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/adhearsion/foundation/thread_safety.rb,
lib/adhearsion/voip/dsl/numerical_string.rb,
lib/adhearsion/foundation/metaprogramming.rb
Instance Method Summary collapse
- #===(arg) ⇒ Object
- #meta_def(name, &block) ⇒ Object
- #meta_eval(&block) ⇒ Object
- #metaclass ⇒ Object
- #synchronize(&block) ⇒ Object
Instance Method Details
#===(arg) ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/adhearsion/voip/dsl/numerical_string.rb', line 90 def ===(arg) if arg.respond_to? :__real_string arg = arg.__real_num if kind_of?(Numeric) || kind_of?(Range) pre_modified_threequal arg else pre_modified_threequal arg end end |
#meta_def(name, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/adhearsion/foundation/metaprogramming.rb', line 12 def (name, &block) do define_method name, &block end end |
#meta_eval(&block) ⇒ Object
8 9 10 |
# File 'lib/adhearsion/foundation/metaprogramming.rb', line 8 def (&block) .instance_eval &block end |
#metaclass ⇒ Object
2 3 4 5 6 |
# File 'lib/adhearsion/foundation/metaprogramming.rb', line 2 def class << self self end end |
#synchronize(&block) ⇒ Object
3 4 5 6 |
# File 'lib/adhearsion/foundation/thread_safety.rb', line 3 def synchronize(&block) @mutex ||= Mutex.new @mutex.synchronize &block end |