Class: ApiMaker::BaseService

Inherits:
ServicePattern::Service
  • Object
show all
Defined in:
lib/api_maker/base_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ability: nil, args: {}, api_maker_args: {}, controller: nil) ⇒ BaseService

Returns a new instance of BaseService.



8
9
10
11
12
13
# File 'lib/api_maker/base_service.rb', line 8

def initialize(ability: nil, args: {}, api_maker_args: {}, controller: nil)
  @args = args
  @api_maker_args = api_maker_args
  @controller = controller
  @current_ability = ability
end

Instance Attribute Details

#api_maker_argsObject (readonly)

Returns the value of attribute api_maker_args.



4
5
6
# File 'lib/api_maker/base_service.rb', line 4

def api_maker_args
  @api_maker_args
end

#argsObject (readonly)

Returns the value of attribute args.



4
5
6
# File 'lib/api_maker/base_service.rb', line 4

def args
  @args
end

#controllerObject (readonly)

Returns the value of attribute controller.



4
5
6
# File 'lib/api_maker/base_service.rb', line 4

def controller
  @controller
end

#current_abilityObject (readonly)

Returns the value of attribute current_ability.



4
5
6
# File 'lib/api_maker/base_service.rb', line 4

def current_ability
  @current_ability
end