lib/fluent.rb in fluent-0.7.3 vs lib/fluent.rb in fluent-0.7.4

- old
+ new

@@ -13,19 +13,21 @@ require 'fluent/data_config' require 'watir-webdriver' require 'selenium-webdriver' require 'mechanize' +require 'rspec' module Fluent include Platforms include Evaluators include Enclosers include Locators include DataSetter include DataBuilder include DataConfig + include RSpec::Matchers # Browser drivers will be: # [Watir::Browser] or [Selenium::WebDriver::Driver] # # @return [Object] browser driver reference @@ -124,7 +126,14 @@ def establish_platform_object_for(browser) @platform = get_platform_for browser Fluent::trace("Fluent platform object: #{@platform}") @platform + end + + # This method processes a block with single or multiple parameters. + # + # @param [Proc] block the block to process + def process_block(&block) + block.arity == 1 ? block.call(self) : self.instance_eval(&block) end end