Class: SirTracksAlot::Queue::ReportConfig

Inherits:
Persistable
  • Object
show all
Defined in:
lib/sir_tracks_alot/queue/report_config.rb

Constant Summary collapse

SESSION_DURATION =
1800
LIMIT =
10000

Instance Method Summary collapse

Methods inherited from Persistable

#==, #eql?, find_or_create, #hash, #to_hash

Instance Method Details

#optionsObject



17
18
19
20
# File 'lib/sir_tracks_alot/queue/report_config.rb', line 17

def options
  self.options = {:limit => LIMIT, :session_duration => SESSION_DURATION} if options_store.nil?
  Marshal.load(options_store)
end

#options=(opts) ⇒ Object



22
23
24
# File 'lib/sir_tracks_alot/queue/report_config.rb', line 22

def options=(opts)
  update(:options_store => Marshal.dump(opts))
end

#validateObject



26
27
28
29
30
# File 'lib/sir_tracks_alot/queue/report_config.rb', line 26

def validate
  assert_present :report
  assert_present :owner      
  assert_present :name
end