Skip to content

Commit

Permalink
Restore class method from_json, as event is no more an included class
Browse files Browse the repository at this point in the history
  • Loading branch information
wiibaa committed Sep 11, 2013
1 parent 7ca972e commit 388ee8a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/logstash/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,10 @@ def initialize(data={})
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
Expand Down

0 comments on commit 388ee8a

Please sign in to comment.