Sha256: c56c4b2a3471a4fbf3018f7f1dfba30104bdfc641dd8072d457ca1dd242e9bf6
Contents?: true
Size: 1.75 KB
Versions: 17
Compression:
Stored size: 1.75 KB
Contents
module Eco module API module Common module Session class BaseSession attr_writer :session, :config attr_reader :environment alias_method :enviro, :environment include Session::Helpers def initialize(env) msg = "Expected object Eco::API::Common::Session::Environment. Given: #{env.class}" raise msg unless env.is_a?(Environment) self.environment = env end def session enviro.session end def environment=(value) @environment = nil @environment = value if value.is_a?(Environment) end alias_method :enviro=, :environment= def config enviro.config end def api(version: nil) enviro.api(version: version) end def api?(version: nil) enviro.api?(version: version) end def file_manager enviro.file_manager end alias_method :fm, :file_manager def mailer enviro.mailer end def mailer? enviro.mailer? end def sftp enviro.sftp end def sftp? enviro.sftp? end def s3uploader enviro.s3uploader end def s3uploader? enviro.s3uploader? end def logger enviro.logger end # TODO: paremeter for the exception def fatal(msg) logger.fatal(msg) raise msg end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems