Sha256: be58bbe4a3753184c04267fdb75547f05b7caea5e147b5f5a1f3b4a9f54f98fb
Contents?: true
Size: 836 Bytes
Versions: 4
Compression:
Stored size: 836 Bytes
Contents
require File.join(File.dirname(__FILE__), 'slow_actions_computation_module') class SlowActions private # Class to hold all #LogEntry objects that are associated with this individual #Action on a #Controller class Action include Computable # Create a new #Action object. # name: the #name of the #Action. i.e. "new" # controller: the #Controller this #Action is a part of def initialize(name, controller) @name = name @controller = controller @log_entries = [] end # Name of this #Action attr_reader :name # #Controller of this #Action attr_reader :controller # Add a log entry to this #Action def add_entry(la) @log_entries << la la.action = self end # All the #LogEntry objects this #Action holds attr_reader :log_entries end end
Version data entries
4 entries across 4 versions & 1 rubygems