The simple case, is this guy:
> m = SecureRandom.method(:hex)
=> #<Method: SecureRandom.hex>
> m.call
=> "5928aab178404945fb560a249b67a000"
> m.call| MIME-Version: 1.0 | |
| Received: by 10.50.16.79 with HTTP; Mon, 28 Jan 2013 08:20:01 -0800 (PST) | |
| Date: Mon, 28 Jan 2013 10:20:01 -0600 | |
| Delivered-To: [email protected] | |
| Message-ID: <CAC3jhfzy+m8u5_hDKMnXCn2A2K9jK1o4Y=NBj0narA4=L7bbjQ@mail.gmail.com> | |
| Subject: Test | |
| From: Ben Hamill <[email protected]> | |
| To: Ben Hamill <[email protected]> | |
| Content-Type: multipart/alternative; boundary=e89a8f234cd728710704d45ba6e3 |
| package main | |
| import ( | |
| "log" | |
| "flag" | |
| "time" | |
| "net" | |
| "fmt" | |
| "bufio" | |
| ) |
| require 'foo' | |
| class Bar | |
| attr_reader :foo | |
| def make_foo | |
| @foo = Foo.new(self) | |
| end | |
| end |
| # Option 1 | |
| if eea_exists? | |
| if eea_uses_something? | |
| if eea_ever_used_application? | |
| if eea_currently_uses_application? | |
| recreate_eea; reactivate_application_for_eea; create_session; #13S | |
| else | |
| recreate_eea; reactivate_application_for_eea; create_session; #13S | |
| end | |
| else |
| describe User do | |
| describe "#serialize_comments" do | |
| before do | |
| subject.stub(:read_comment_count).and_return(3) | |
| subject.stub(:unread_comment_count).and_return(5) | |
| end | |
| it "does something when there are 5 unread comments" | |
| end | |
| end |
| class Foo | |
| %w(bar baz).each do |m| | |
| define_method("say_#{m}") do | |
| raise m.to_s | |
| end | |
| end | |
| end | |
| f = Foo.new |
| Problem Employee | |
| Servers Bob | |
| Background Jobs Brad | |
| Database Ben | |
| JavaScript Isaac | |
| CSS Andy | |
| Translations Ryan | |
| Bad Smells Marcos | |
| Dumb Words Brian |
| class Foo | |
| def self.bar | |
| @bar ||= :self_bar | |
| end | |
| def self.bar=(b) | |
| @bar = b | |
| end | |
| def bar |
| OmniAuth.config.on_failure do |env| | |
| exception = env['omniauth.error'] | |
| error_type = env['omniauth.error.type'] | |
| strategy = env['omniauth.error.strategy'] | |
| Rails.logger.error("OmniAuth Error (#{error_type}): #{exception.inspect}") | |
| ErrorNotifier.exception(exception, :strategy => strategy.inspect, :error_type => error_type) | |
| new_path = "#{env['SCRIPT_NAME']}#{OmniAuth.config.path_prefix}/failure?message=#{error_type}" |