Class: NewRelic::Agent::NewRelicService::Marshaller
- Inherits:
-
Object
- Object
- NewRelic::Agent::NewRelicService::Marshaller
- Defined in:
- lib/new_relic/agent/new_relic_service/marshaller.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.human_readable? ⇒ Boolean
24 25 26 |
# File 'lib/new_relic/agent/new_relic_service/marshaller.rb', line 24 def self.human_readable? false end |
Instance Method Details
#default_encoder ⇒ Object
20 21 22 |
# File 'lib/new_relic/agent/new_relic_service/marshaller.rb', line 20 def default_encoder Encoders::Identity end |
#prepare(data, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/new_relic/agent/new_relic_service/marshaller.rb', line 9 def prepare(data, = {}) encoder = [:encoder] || default_encoder if data.respond_to?(:to_collector_array) data.to_collector_array(encoder) elsif data.kind_of?(Array) data.map { |element| prepare(element, ) } else data end end |