Parent

Files

Mocha::PrettyParameters

Public Class Methods

new(params) click to toggle source
    # File lib/mocha/pretty_parameters.rb, line 7
 7:     def initialize(params)
 8:       @params = params
 9:       @params_string = params.mocha_inspect
10:     end

Public Instance Methods

pretty() click to toggle source
    # File lib/mocha/pretty_parameters.rb, line 12
12:     def pretty
13:       remove_outer_array_braces!
14:       remove_outer_hash_braces!
15:       @params_string
16:     end
remove_outer_array_braces!() click to toggle source
    # File lib/mocha/pretty_parameters.rb, line 18
18:     def remove_outer_array_braces!
19:       @params_string = @params_string.gsub(/^\[|\]$/, '')
20:     end
remove_outer_hash_braces!() click to toggle source
    # File lib/mocha/pretty_parameters.rb, line 22
22:     def remove_outer_hash_braces!
23:       @params_string = @params_string.gsub(/^\{|\}$/, '') if @params.length == 1
24:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.