Class: Sapphire::Plugins::VerbosePlugin
- Defined in:
- lib/sapphire/Plugins/Debugging/VerboseObserver.rb
Instance Attribute Summary
Attributes inherited from Plugin
Class Method Summary collapse
Instance Method Summary collapse
- #After(instance, method, args) ⇒ Object
- #Before(instance, method, args) ⇒ Object
-
#initialize ⇒ VerbosePlugin
constructor
A new instance of VerbosePlugin.
- #OnFailure(instance, method, exception, args) ⇒ Object
- #OnSuccess(instance, method, args) ⇒ Object
Methods inherited from Plugin
Constructor Details
#initialize ⇒ VerbosePlugin
Returns a new instance of VerbosePlugin.
6 7 8 9 10 11 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 6 def initialize observes :class => :all, :method => :all end |
Class Method Details
.IsObserver ⇒ Object
29 30 31 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 29 def self.IsObserver() true end |
Instance Method Details
#After(instance, method, args) ⇒ Object
17 18 19 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 17 def After(instance, method, args) puts "after" if ENV["verbose"] == "true" end |
#Before(instance, method, args) ⇒ Object
13 14 15 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 13 def Before(instance, method, args) puts "before #{method} on #{instance}" if ENV["verbose"] == "true" end |
#OnFailure(instance, method, exception, args) ⇒ Object
25 26 27 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 25 def OnFailure(instance, method, exception, args) puts "failure" if ENV["verbose"] == "true" end |
#OnSuccess(instance, method, args) ⇒ Object
21 22 23 |
# File 'lib/sapphire/Plugins/Debugging/VerboseObserver.rb', line 21 def OnSuccess(instance, method, args) puts "success" if ENV["verbose"] == "true" end |