Class: Jahuty::Action::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/jahuty/action/base.rb

Overview

Provides common logic for service actions.

Direct Known Subclasses

Index, Show

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource:, params: {}) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/jahuty/action/base.rb', line 9

def initialize(resource:, params: {})
  @resource = resource
  @params   = params
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



7
8
9
# File 'lib/jahuty/action/base.rb', line 7

def params
  @params
end

#resourceObject

Returns the value of attribute resource.



7
8
9
# File 'lib/jahuty/action/base.rb', line 7

def resource
  @resource
end