Class: SocMed::Services::BaseService
- Inherits:
-
Object
- Object
- SocMed::Services::BaseService
- Defined in:
- lib/soc_med/services/base_service.rb
Direct Known Subclasses
SocMed::Services::Blocks::BlockBase, SocMed::Services::Blocks::Destroy, Follows::Create, Follows::FollowBase, Likes::LikeBase, Reports::BaseReport
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #call(&block) ⇒ Object
-
#initialize(params) ⇒ BaseService
constructor
A new instance of BaseService.
Constructor Details
#initialize(params) ⇒ BaseService
Returns a new instance of BaseService.
16 17 18 |
# File 'lib/soc_med/services/base_service.rb', line 16 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
10 11 12 |
# File 'lib/soc_med/services/base_service.rb', line 10 def params @params end |
Class Method Details
.call(params, &block) ⇒ Object
12 13 14 |
# File 'lib/soc_med/services/base_service.rb', line 12 def self.call(params, &block) new(params).call(&block) end |
Instance Method Details
#call(&block) ⇒ Object
22 23 24 |
# File 'lib/soc_med/services/base_service.rb', line 22 def call(&block) raise NotImplementedError end |