Class: Rails::AddOns::Service::Result::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Translation
Includes:
Succeedable
Defined in:
app/services/rails/add_ons/service/result/base.rb

Defined Under Namespace

Modules: Succeedable

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Succeedable

#failed?, #ok?, #success?

Constructor Details

#initialize(service) ⇒ Base


9
10
11
# File 'app/services/rails/add_ons/service/result/base.rb', line 9

def initialize(service)
  @service = service
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors


7
8
9
# File 'app/services/rails/add_ons/service/result/base.rb', line 7

def errors
  @errors
end

#messagesObject (readonly)

Returns the value of attribute messages


7
8
9
# File 'app/services/rails/add_ons/service/result/base.rb', line 7

def messages
  @messages
end

#serviceObject (readonly)

Returns the value of attribute service


7
8
9
# File 'app/services/rails/add_ons/service/result/base.rb', line 7

def service
  @service
end

Instance Method Details

#model_nameObject


13
14
15
# File 'app/services/rails/add_ons/service/result/base.rb', line 13

def model_name
  @service.model_name
end