class Eco::API::Common::Loaders::Base
Public Class Methods
<=>(other)
click to toggle source
Sort order
# File lib/eco/api/common/loaders/base.rb, line 10 def <=>(other) created_at <=> other.created_at end
created_at()
click to toggle source
Class creation timestamp, to be able to load them in the order they were declared.
# File lib/eco/api/common/loaders/base.rb, line 20 def created_at @created_at ||= Time.now end
new()
click to toggle source
This method will be called when the BaseLoader is created @note
- this method should implement the loading logics for the given `Children` class.
# File lib/eco/api/common/loaders/base.rb, line 28 def initialize raise "You should implement this method" end
set_created_at!()
click to toggle source
If still not set, it sets the `created_at` class timestamp.
# File lib/eco/api/common/loaders/base.rb, line 15 def set_created_at! @created_at = Time.now unless @created_at end
Public Instance Methods
name()
click to toggle source
# File lib/eco/api/common/loaders/base.rb, line 32 def name self.class.name end
Private Instance Methods
config()
click to toggle source
# File lib/eco/api/common/loaders/base.rb, line 42 def config session.config end
logger()
click to toggle source
# File lib/eco/api/common/loaders/base.rb, line 46 def logger session.logger end
micro()
click to toggle source
# File lib/eco/api/common/loaders/base.rb, line 50 def micro session.micro end
session()
click to toggle source
# File lib/eco/api/common/loaders/base.rb, line 38 def session ASSETS.session end