class Itly::Plugin::Amplitude::CallOptions

Amplitude specific plugin options class

Constants

PROPS

Attributes

callback[R]

Public Instance Methods

to_hash() click to toggle source

Return all properties to be passed to the client While excluding the `callback` property

@return [Hash] properties

# File lib/itly/plugin/amplitude/call_options.rb, line 33
def to_hash
  PROPS.each_with_object({}) { |prop, hash| hash[prop.to_sym] = send(prop) unless send(prop).nil? }
end
to_s() click to toggle source

Get the plugin description, for logs

@return [String] description

# File lib/itly/plugin/amplitude/call_options.rb, line 42
def to_s
  class_name = self.class.name.split('::').last
  props = PROPS.collect { |prop| " #{prop}: #{send prop}" unless send(prop).nil? }.compact
  "#<Amplitude::#{class_name} callback: #{callback.nil? ? 'nil' : 'provided'}#{props.join}>"
end