Created
August 31, 2012 20:16
-
-
Save itsderek23/3558367 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require File.expand_path(File.dirname(__FILE__) + "/parent.rb") | |
| class Child < Parent | |
| def build_report | |
| report(:parent_value => parent_method) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ()$scout test child.rb | |
| == This plugin doesn't have option metadata. | |
| == You haven't provided any options for running this plugin. | |
| == Output: | |
| {:server_name=>"", | |
| :errors=>[], | |
| :snapshot=>"", | |
| :reports=> | |
| [{:fields=>{:parent_value=>"parent"}, | |
| :created_at=>"2012-08-31 20:15:40", | |
| :local_filename=>nil, | |
| :plugin_id=>nil, | |
| :origin=>nil}], | |
| :config_path=>"/Users/itsderek23/.scout", | |
| :alerts=>[], | |
| :summaries=>[], | |
| :options=>[]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Parent < Scout::Plugin | |
| def build_report | |
| report(:parent_value => parent_method) | |
| end | |
| def parent_method | |
| "parent" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment