Class: RSpec::Parameterized::Core::RefArg

Inherits:
Arg
  • Object
show all
Defined in:
lib/rspec/parameterized/core/ref_arg.rb

Instance Method Summary collapse

Constructor Details

#initialize(symbol) ⇒ RefArg

Returns a new instance of RefArg.



6
7
8
# File 'lib/rspec/parameterized/core/ref_arg.rb', line 6

def initialize(symbol)
  @symbol = symbol
end

Instance Method Details

#apply(obj) ⇒ Object



10
11
12
# File 'lib/rspec/parameterized/core/ref_arg.rb', line 10

def apply(obj)
  obj.send(@symbol)
end

#inspectObject



14
15
16
# File 'lib/rspec/parameterized/core/ref_arg.rb', line 14

def inspect
  "#{@symbol}"
end