Class: Eco::API::UseCases::GraphQL::Base

Inherits:
Common::Loaders::UseCase show all
Includes:
Helpers::Base
Defined in:
lib/eco/api/usecases/graphql/base.rb

Direct Known Subclasses

Samples::Location

Defined Under Namespace

Classes: NotImplementedMethod

Instance Attribute Summary

Attributes included from Helpers::Base

#options, #session

Attributes included from Language::AuxiliarLogger

#logger

Attributes inherited from Common::Loaders::CaseBase

#usecase

Instance Method Summary collapse

Methods included from Helpers::Base

#backup, #config, #exit_error, #graphql, #simulate?

Methods included from Language::AuxiliarLogger

#log

Methods inherited from Common::Loaders::UseCase

#initialize, type, #type

Methods inherited from Common::Loaders::CaseBase

#name, name_only_once!

Methods inherited from Common::Loaders::Base

<=>, created_at, #initialize, #name, set_created_at!

Methods included from Common::ClassHelpers

#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant

Constructor Details

This class inherits a constructor from Eco::API::Common::Loaders::UseCase

Instance Method Details

#main(session, options, usecase) ⇒ Object



10
11
12
13
14
# File 'lib/eco/api/usecases/graphql/base.rb', line 10

def main(session, options, usecase)
  options.deep_merge!(workflow: {no_email: true}) # prevent the default mailer to quick in
  options[:end_get] = false
  process
end

#processObject

Write here your script



17
18
19
# File 'lib/eco/api/usecases/graphql/base.rb', line 17

def process
  raise NotImplementedMethod, "You need to inherit from this class ('#{self.class}') and call super with a block"
end