Created
March 2, 2016 19:59
-
-
Save BanzaiMan/177854ba69e551fce65d 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 'ostruct' | |
job = OpenStruct.new( :state => 'failed') | |
def debug_data | |
{ | |
previous_state: job.state | |
} | |
end | |
debug_data # NameError on `job`! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obviously, one can pass an arg to
#debug_data
.