Class: Fried::Test::Activate

Inherits:
Object
  • Object
show all
Defined in:
lib/fried/test/activate.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActivate

Returns a new instance of Activate.



8
9
10
# File 'lib/fried/test/activate.rb', line 8

def initialize
  @target = nil
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



6
7
8
# File 'lib/fried/test/activate.rb', line 6

def target
  @target
end

Class Method Details

.buildObject



12
13
14
15
16
# File 'lib/fried/test/activate.rb', line 12

def self.build
  new.tap do |instance|
    instance.target = Module
  end
end

.callObject



27
28
29
30
# File 'lib/fried/test/activate.rb', line 27

def self.call
  instance = build
  instance.()
end

Instance Method Details

#callvoid

This method returns an undefined value.



19
20
21
22
23
24
25
# File 'lib/fried/test/activate.rb', line 19

def call
  return if target.nil?

  target.class_eval do
    include Minitest::Spec::DSL
  end
end