Class: ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::ValueUnmock

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/value_unmock.rb

Overview

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

#initialize(feature_class: nil, entry_name: nil, arguments: nil) ⇒ void

Parameters:

Since:

  • 1.0.0



20
21
22
23
24
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/value_unmock.rb', line 20

def initialize(feature_class: nil, entry_name: nil, arguments: nil)
  @feature_class = feature_class
  @entry_name = entry_name
  @arguments = arguments
end

Instance Method Details

#==(other) ⇒ Boolean?

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



49
50
51
52
53
54
55
56
57
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/value_unmock.rb', line 49

def ==(other)
  return unless other.instance_of?(self.class)

  return false if feature_class != other.feature_class
  return false if entry_name != other.entry_name
  return false if arguments != other.arguments

  true
end

#for(feature_class, entry_name, arguments) ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::ValueUnmock

Parameters:

Returns:

Since:

  • 1.0.0



32
33
34
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/value_unmock.rb', line 32

def for(feature_class, entry_name, arguments)
  self.class.new(feature_class: feature_class, entry_name: entry_name, arguments: arguments)
end

#registerConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::ValueUnmock



39
40
41
42
43
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/value_unmock.rb', line 39

def register
  Commands::DeleteFeatureStubbedEntry[feature: feature_class, entry: entry_name, arguments: arguments]

  self
end