Sha256: 4af10138c0c96ec6312d83de5d9a334e3111f99a19f43dc2002827e21def5728
Contents?: true
Size: 1.68 KB
Versions: 10
Compression:
Stored size: 1.68 KB
Contents
module Eco module API module Common module Session class BaseSession attr_accessor :session attr_accessor :environment, :config alias_method :enviro, :environment alias_method :enviro=, :environment= attr_reader :api, :file_manager, :logger alias_method :fm, :file_manager include Session::Helpers def initialize(e) raise "Expected object Eco::API::Common::Session::Environment. Given: #{e.class}" unless e.is_a?(Environment) self.environment = e end def session enviro.session end def environment=(value) @environment = nil @environment = value if value.is_a?(Environment) end def config enviro.config end def api(version: nil) enviro.api(version: version) end def file_manager enviro.file_manager end 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
10 entries across 10 versions & 1 rubygems