Class: Transpec::Syntax::MethodStub::DeprecatedMethodRecordBuilder

Inherits:
RecordBuilder
  • Object
show all
Defined in:
lib/transpec/syntax/method_stub.rb

Instance Method Summary collapse

Methods inherited from RecordBuilder

build, #build, param_names

Instance Method Details

#new_syntaxObject



212
213
214
215
216
# File 'lib/transpec/syntax/method_stub.rb', line 212

def new_syntax
  syntax = 'obj.'
  syntax << method_stub.replacement_for_deprecated_method
  syntax << '(:message)'
end

#old_syntaxObject



207
208
209
210
# File 'lib/transpec/syntax/method_stub.rb', line 207

def old_syntax
  syntax = method_stub.any_instance? ? 'Klass.any_instance' : 'obj'
  syntax << ".#{method_stub.method_name}(:message)"
end