class Playtypus::CallContainer
Attributes
calls[RW]
Public Class Methods
from_log(log_content)
click to toggle source
# File lib/playtypus/call_container.rb, line 8 def self.from_log(log_content) calls = [] json = JSON.parse(log_content.force_encoding("utf-8")) json.each do |log_entry| calls << Playtypus::Call.from_hash(log_entry) end return self.new(calls.sort_by{ |k| k.timestamp}) end
new(calls)
click to toggle source
# File lib/playtypus/call_container.rb, line 17 def initialize(calls) @calls = calls end