Class: LogStash::Event
- Inherits:
-
Object
- Object
- LogStash::Event
- Defined in:
- lib/logstash/devutils/rspec/spec_helper.rb
Overview
ugly, I know, but this avoids adding conditionals in performance critical section
Instance Method Summary collapse
Instance Method Details
#[]=(str, value) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/logstash/devutils/rspec/spec_helper.rb', line 36 def []=(str, value) if str == TIMESTAMP && !value.is_a?(LogStash::Timestamp) raise TypeError, "The field '@timestamp' must be a LogStash::Timestamp, not a #{value.class} (#{value})" end LogStash::Event.validate_value(value) setval(str, value) end |
#setval ⇒ Object
35 |
# File 'lib/logstash/devutils/rspec/spec_helper.rb', line 35 alias_method :setval, :[]= |