Class: RailsPerformance::Models::BaseRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_performance/models/base_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_db(key, value) ⇒ Object



4
5
6
# File 'lib/rails_performance/models/base_record.rb', line 4

def self.from_db(key, value)
  raise 'implement me'
end

Instance Method Details

#durationObject



20
21
22
# File 'lib/rails_performance/models/base_record.rb', line 20

def duration
  value['duration']
end

#record_hashObject



12
13
14
# File 'lib/rails_performance/models/base_record.rb', line 12

def record_hash
  raise 'implement me'
end

#saveObject



8
9
10
# File 'lib/rails_performance/models/base_record.rb', line 8

def save
  raise 'implement me'
end

#valueObject



16
17
18
# File 'lib/rails_performance/models/base_record.rb', line 16

def value
  @value ||= JSON.parse(@json || "{}")
end