Module: Skylight::Helpers::ClassMethods
- Defined in:
- lib/skylight/helpers.rb
Overview
Instance Method Summary collapse
- #instrument_method(*args) ⇒ Object
- #method_added(name) ⇒ Object private
- #singleton_method_added(name) ⇒ Object private
Instance Method Details
#instrument_method ⇒ Object #instrument_method([name], opts = {}) ⇒ Object
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/skylight/helpers.rb', line 83 def instrument_method(*args) opts = args.pop if Hash === args.last if name = args.pop title = "#{to_s}##{name}" __sk_instrument_method_on(self, name, title, opts || {}) else @__sk_instrument_next_method = opts || {} end end |
#method_added(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 |
# File 'lib/skylight/helpers.rb', line 13 def method_added(name) super if opts = @__sk_instrument_next_method @__sk_instrument_next_method = nil title = "#{to_s}##{name}" __sk_instrument_method_on(self, name, title, opts) end end |
#singleton_method_added(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 29 30 31 32 |
# File 'lib/skylight/helpers.rb', line 24 def singleton_method_added(name) super if opts = @__sk_instrument_next_method @__sk_instrument_next_method = nil title = "#{to_s}.#{name}" __sk_instrument_method_on(__sk_singleton_class, name, title, opts) end end |