Class: LogStash::Timestamp
- Defined in:
- modules/profile/files/logstash/helpers/filter_scripts_test_helper.rb
Instance Method Summary collapse
-
#initialize(time) ⇒ Timestamp
constructor
A new instance of Timestamp.
- #to_json ⇒ Object
Constructor Details
#initialize(time) ⇒ Timestamp
Returns a new instance of Timestamp.
12 13 14 15 |
# File 'modules/profile/files/logstash/helpers/filter_scripts_test_helper.rb', line 12 def initialize(time) @time = DateTime.parse(time) self end |
Instance Method Details
#to_json ⇒ Object
17 18 19 |
# File 'modules/profile/files/logstash/helpers/filter_scripts_test_helper.rb', line 17 def to_json(*) "\"#{@time.iso8601}\"" end |