lib/timber/contexts/system.rb in timber-2.1.9 vs lib/timber/contexts/system.rb in timber-2.1.10
- old
+ new
@@ -12,16 +12,15 @@
attr_reader :hostname, :pid
def initialize(attributes)
@hostname = attributes[:hostname]
- @pid = attributes[:pid]
- @pid = Timber::Util::Object.try(@pid, :to_i)
+ @pid = Timber::Util::Object.try(attributes[:pid], :to_i)
end
# Builds a hash representation containing simple objects, suitable for serialization (JSON).
def as_json(_options = {})
- {hostname: hostname, pid: Timber::Util::Object.try(pid, :to_i)}
+ {hostname: hostname, pid: pid}
end
end
end
end
\ No newline at end of file