mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Restore class method from_json, as event is no more an included class
This commit is contained in:
parent
7ca972e8d1
commit
388ee8a0ab
1 changed files with 3 additions and 11 deletions
|
@ -57,18 +57,10 @@ class LogStash::Event
|
|||
data["@version"] = "1" if !@data.include?("@version")
|
||||
end # def initialize
|
||||
|
||||
# Add class methods on inclusion.
|
||||
public
|
||||
def self.included(klass)
|
||||
klass.extend(ClassMethods)
|
||||
end # def included
|
||||
|
||||
module ClassMethods
|
||||
public
|
||||
def from_json(json)
|
||||
return self.new(JSON.parse(json))
|
||||
end # def from_json
|
||||
end
|
||||
def self.from_json(json)
|
||||
return self.new(JSON.parse(json))
|
||||
end # def from_json
|
||||
|
||||
public
|
||||
def cancel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue