class Castle::Commands::Track
Public Class Methods
build(options = {})
click to toggle source
@param options [Hash] @return [Castle::Command]
# File lib/castle/commands/track.rb, line 9 def build(options = {}) Castle::Validators::Present.call(options, %i[event]) context = Castle::Context::Sanitize.call(options[:context]) Castle::Command.new( 'track', options.merge(context: context, sent_at: Castle::Utils::GetTimestamp.call), :post ) end