class Ethon::Easy::Mirror
Attributes
options[R]
to_hash[R]
Public Class Methods
from_easy(easy)
click to toggle source
# File lib/ethon/easy/mirror.rb, line 16 def self.from_easy(easy) options = {} informations_to_mirror.each do |info| options[info] = easy.send(info) end new(options) end
informations_to_log()
click to toggle source
# File lib/ethon/easy/mirror.rb, line 12 def self.informations_to_log [:url, :response_code, :return_code, :total_time] end
informations_to_mirror()
click to toggle source
# File lib/ethon/easy/mirror.rb, line 7 def self.informations_to_mirror Informations::AVAILABLE_INFORMATIONS.keys + [:return_code, :response_headers, :response_body, :debug_info] end
new(options = {})
click to toggle source
# File lib/ethon/easy/mirror.rb, line 24 def initialize(options = {}) @options = options end
Public Instance Methods
log_informations()
click to toggle source
# File lib/ethon/easy/mirror.rb, line 28 def log_informations Hash[*self.class.informations_to_log.map do |info| [info, options[info]] end.flatten] end