Sha256: 96d142e036e5ca6b6ac81251c35ddaaeebfe9e45bd79d84d38ae7220d416e8ac
Contents?: true
Size: 1.25 KB
Versions: 21
Compression:
Stored size: 1.25 KB
Contents
module Eco module API module Common module Session class BaseSession include Common::People 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 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 enviro.api end def file_manager enviro.file_manager 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
21 entries across 21 versions & 1 rubygems