- Foo
- Bar
- Bar
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
| puts "Start parsing A" | |
| require_relative 'b' | |
| puts "Finish parsing A" | |
| print "$foo_global_variable: " | |
| p $foo_global_variable | |
| print "@@foo_class_variable: " |
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 Thing | |
| def foo(first, bar: 123) | |
| __callee__ # => :foo | |
| __dir__ # => "/private/var/folders/gz/5xvm5fkx79bdr3bnbchj68980000gn/T/seeing_is_believing_temp_dir20140501-76590-1yme1ex" | |
| __id__ # => 70335328646640 | |
| __method__ # => :foo | |
| binding # => #<Binding:0x007ff0708ee7d0> | |
| caller # => ["/var/folders/gz/5xvm5fkx79bdr3bnbchj68980000gn/T/seeing_is_believing_temp_dir20140501-76590-1yme1ex/program.rb:29:in `<main>'"] | |
| caller_locations # => ["/var/folders/gz/5xvm5fkx79bdr3bnbchj68980000gn/T/seeing_is_believing_temp_dir20140501-76590-1yme1ex/program.rb:29:in `<main>'"] | |
| local_variables # => [:first, :bar, :args] |
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
| suites: | |
| - name: default | |
| run_list: | |
| - recipe[drone::default] | |
| - name: mysql | |
| attributes: | |
| drone: | |
| droned_opts: | |
| driver: sqlite3 | |
| run_list: |
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
| puts RUBY_DESCRIPTION | |
| require 'benchmark' | |
| count = (ARGV[0] || 1_000_000).to_i | |
| class Thing | |
| def foo | |
| :bar | |
| 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
| require 'benchmark' | |
| require 'active_support/core_ext' | |
| class Transaction | |
| attr_reader :amount | |
| def initialize(amount) | |
| @amount = amount | |
| 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
| it "defines an open_close method that taps the pin" do | |
| pin = runner.pins[:open_close] | |
| expect(pin).to receive(:on) | |
| expect(runner).to receive(:set_pin_in).with(pin, :off, 0.25) | |
| runner.open_close | |
| 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
| def tap_pin(pin) | |
| set_pin(pin, :on) | |
| set_pin_in(pin, :off, 0.25) | |
| end | |
| def set_pin(pin, state) | |
| return if read_pin(pin) == state | |
| pin.send(state) | |
| 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
| diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in | |
| index 7225e84..9c02efa 100644 | |
| --- a/client/tomcatconf/simulatorComponentContext.xml.in | |
| +++ b/client/tomcatconf/simulatorComponentContext.xml.in | |
| @@ -251,4 +251,14 @@ | |
| <property name="name" value="ExplicitDedicationProcessor"/> | |
| <property name="type" value="ExplicitDedication"/> | |
| </bean> | |
| + | |
| +<bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus"> |
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
| def reset | |
| Object.send :remove_const, 'Person' | |
| end | |
| # Inheriting from struct | |
| class Person < Struct.new(:first_name, :last_name) | |
| def full_name | |
| [first_name, last_name].compact.join(' ') | |
| end | |
| end |