assert_select_email

assert_select_email(&block) Instance Public methods Extracts the body of an email and runs nested assertions on it. You must enable deliveries for this assertion to work, use: ActionMailer::Base.perform_deliveries = true assert_select_email do assert_select "h1", "Email alert" end assert_select_email do items = assert_select "ol>li" items.each do # Work with items here... end end

overwrite=

overwrite=(ovwt) Instance Public methods

[]=

WIN32OLE_VARIANT[i,j,...] = val #=> set the element of OLE array Instance Public methods Set the element of WIN32OLE_VARIANT object(OLE array) to val. This method is available only when the variant type of WIN32OLE_VARIANT object is VT_ARRAY. REMARK: The all indicies should be 0 or natural number and lower than or equal to max indicies. (This point is different with Ruby Array indicies.) obj = WIN32OLE_VARIANT.new([[1,2,3],[4,5,6]]) obj[0,0] = 7 obj[1,0] = 8 p obj.value # =>

trace

TracePoint.trace(*events) { |obj| block } â obj Class Public methods A convenience method for ::new, that activates the trace automatically. trace = TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] } #=> #<TracePoint:0x007f786a452448> trace.enabled? #=> true

cache

cache(key, options = {}, &block) Instance Protected methods Convenience accessor.

restart

restart(*restart_args, &b) Instance Public methods

params_array_from

params_array_from(raw_params) Instance Public methods Takes #raw_params and turns it into an array of parameters

default

WIN32OLE_PARAM#default Instance Public methods Returns default value. If the default value does not exist, this method returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') method.params.each do |param| if param.default puts "#{param.name} (= #{param.default})" else puts "#{param}" end end The above script result is following: Filename FileFormat Password WriteResPassword

setproperty

WIN32OLE.setproperty('property', [arg1, arg2,...] val) Instance Public methods Sets property of OLE object. When you want to set property with argument, you can use this method. excel = WIN32OLE.new('Excel.Application') excel.Visible = true book = excel.workbooks.add sheet = book.worksheets(1) sheet.setproperty('Cells', 1, 2, 10) # => The B1 cell value is 10.

at_beginning_of_year

at_beginning_of_year() Instance Public methods Alias for: beginning_of_year