Class: Castle::Commands::Identify
- Inherits:
-
Object
- Object
- Castle::Commands::Identify
- Defined in:
- lib/castle/commands/identify.rb
Instance Method Summary collapse
- #build(options = {}) ⇒ Object
-
#initialize(context) ⇒ Identify
constructor
A new instance of Identify.
Constructor Details
#initialize(context) ⇒ Identify
Returns a new instance of Identify.
6 7 8 |
# File 'lib/castle/commands/identify.rb', line 6 def initialize(context) @context = context end |
Instance Method Details
#build(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/castle/commands/identify.rb', line 10 def build( = {}) Castle::Validators::NotSupported.call(, i[properties]) context = Castle::Context::Merger.call(@context, [:context]) context = Castle::Context::Sanitizer.call(context) Castle::Command.new( 'identify', .merge(context: context, sent_at: Castle::Utils::Timestamp.call), :post ) end |