Class: ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy Private
- Inherits:
-
Object
- Object
- ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy
- Defined in:
- lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #define ⇒ Boolean private
- #defined? ⇒ Boolean private
- #initialize(chain: {}, &block) ⇒ void constructor private
- #result(&block) ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result private
- #to_class(&block) ⇒ Class<ConvenientService::Service> (also: #service) private
- #with_arguments ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy private
- #with_config(config) ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy private
- #with_variables(**variables) ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy private
Constructor Details
#initialize(chain: {}, &block) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 31 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 23 def initialize(chain: {}, &block) @chain = chain if block chain[:block] = block define end end |
Instance Method Details
#==(other) ⇒ Boolean?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
133 134 135 136 137 138 139 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 133 def ==(other) return unless other.instance_of?(self.class) return false if chain != other.chain true end |
#define ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 43 def define return false if self.defined? klass.include config variables.each_pair { |key, value| klass.define_method(key) { value } } klass.class_exec(arguments, &block) mark_as_defined! true end |
#defined? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 36 def defined? chain.has_key?(:defined) end |
#result(&block) ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 96 def result(&block) if block assert_not_defined! chain[:block] = block define end klass.result end |
#to_class(&block) ⇒ Class<ConvenientService::Service> Also known as: service
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 112 def to_class(&block) if block assert_not_defined! chain[:block] = block define end klass end |
#with_arguments ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 63 64 65 66 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 60 def with_arguments(...) assert_not_defined! chain[:arguments] = Support::Arguments.new(...) self end |
#with_config(config) ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
84 85 86 87 88 89 90 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 84 def with_config(config) assert_not_defined! chain[:config] = config self end |
#with_variables(**variables) ⇒ ConvenientService::Service::Plugins::CanHaveInlineServices::Entities::Proxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
72 73 74 75 76 77 78 |
# File 'lib/convenient_service/service/plugins/can_have_inline_services/entities/proxy.rb', line 72 def with_variables(**variables) assert_not_defined! chain[:variables] = variables self end |