Sha256: be52759c4ca38e73a438ea99d23ad554b1a65c39ccf84dcc0e62f4363d9d628d

Contents?: true

Size: 351 Bytes

Versions: 7

Compression:

Stored size: 351 Bytes

Contents

module Bogus
  class MakesSubstituteMethods
    extend Takes

    takes :method_stringifier

    def stringify(method)
      args = method_stringifier.argument_values(method.parameters)

      send_args = [method.name.inspect, args].reject(&:empty?).join(', ')

      method_stringifier.stringify(method, "__record__(#{send_args})")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bogus-0.1.7 lib/bogus/fakes/makes_substitute_methods.rb
bogus-0.1.6 lib/bogus/fakes/makes_substitute_methods.rb
bogus-0.1.5 lib/bogus/fakes/makes_substitute_methods.rb
bogus-0.1.4 lib/bogus/fakes/makes_substitute_methods.rb
bogus-0.1.3 lib/bogus/makes_substitute_methods.rb
bogus-0.1.2 lib/bogus/makes_substitute_methods.rb
bogus-0.1.1 lib/bogus/makes_substitute_methods.rb