Class: Transpec::Syntax::MethodStub::DeprecatedMethodRecord
- Defined in:
- lib/transpec/syntax/method_stub.rb
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
- #converted_syntax ⇒ Object
-
#initialize(method_stub) ⇒ DeprecatedMethodRecord
constructor
A new instance of DeprecatedMethodRecord.
- #original_syntax ⇒ Object
Methods inherited from Record
Constructor Details
#initialize(method_stub) ⇒ DeprecatedMethodRecord
Returns a new instance of DeprecatedMethodRecord.
220 221 222 |
# File 'lib/transpec/syntax/method_stub.rb', line 220 def initialize(method_stub, *) @method_stub = method_stub end |
Instance Method Details
#converted_syntax ⇒ Object
229 230 231 232 233 |
# File 'lib/transpec/syntax/method_stub.rb', line 229 def converted_syntax syntax = 'obj.' syntax << @method_stub.send(:replacement_method_for_deprecated_method) syntax << '(:message)' end |
#original_syntax ⇒ Object
224 225 226 227 |
# File 'lib/transpec/syntax/method_stub.rb', line 224 def original_syntax syntax = @method_stub.any_instance? ? 'Klass.any_instance' : 'obj' syntax << ".#{@method_stub.method_name}(:message)" end |