Class: ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
- Inherits:
-
Object
- Object
- ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
- Defined in:
- lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb
Overview
Instance Method Summary collapse
- #==(other) ⇒ Boolean?
- #initialize(feature_class:, entry_name:) ⇒ void constructor
- #to(value_unmock) ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
- #to_return_value_mock ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::ValueUnmock
- #with_any_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
- #with_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
- #without_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
Constructor Details
#initialize(feature_class:, entry_name:) ⇒ void
22 23 24 25 26 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 22 def initialize(feature_class:, entry_name:) @feature_class = feature_class @entry_name = entry_name @arguments = nil end |
Instance Method Details
#==(other) ⇒ Boolean?
81 82 83 84 85 86 87 88 89 90 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 81 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 return false if value_unmock != other.value_unmock true end |
#to(value_unmock) ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
62 63 64 65 66 67 68 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 62 def to(value_unmock) @value_unmock = value_unmock.for(feature_class, entry_name, arguments) @value_unmock.register self end |
#to_return_value_mock ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::ValueUnmock
73 74 75 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 73 def to_return_value_mock @value_unmock = Entities::ValueUnmock.new(feature_class: feature_class, entry_name: entry_name, arguments: arguments) end |
#with_any_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
43 44 45 46 47 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 43 def with_any_arguments(...) @arguments = nil self end |
#with_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
31 32 33 34 35 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 31 def with_arguments(...) @arguments = Support::Arguments.new(...) self end |
#without_arguments ⇒ ConvenientService::Feature::Plugins::CanHaveStubbedEntries::Entities::FeatureUnstub
52 53 54 55 56 |
# File 'lib/convenient_service/feature/plugins/can_have_stubbed_entries/entities/feature_unstub.rb', line 52 def without_arguments @arguments = Support::Arguments.null_arguments self end |