Class: RSpecMethodGrouping::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_method_grouping.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(example) ⇒ Base

Returns a new instance of Base.



17
18
19
# File 'lib/rspec_method_grouping.rb', line 17

def initialize(example)
  @example = example
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



21
22
23
# File 'lib/rspec_method_grouping.rb', line 21

def method_missing(name, *args)
  @example.send(name, *args)
end

Class Method Details

.method_missing(name, *args) ⇒ Object



12
13
14
# File 'lib/rspec_method_grouping.rb', line 12

def method_missing(name, *args)
  @finder.send(name, *args)
end

.prepare(example) ⇒ Object



8
9
10
# File 'lib/rspec_method_grouping.rb', line 8

def prepare(example)
  @finder = new(example)
end