lib/misp/event.rb in misp-0.1.2 vs lib/misp/event.rb in misp-0.1.3

- old
+ new

@@ -202,21 +202,21 @@ # Add an attribute to an event. Requires an update or create call afterwards. # # @return [MISP::Event] # def add_attribute(attribute) - attribute = Attribute.new(attribute) unless attribute.is_a?(Attribute) + attribute = Attribute.new(**attribute) unless attribute.is_a?(Attribute) attributes << attribute self end # # Add a tag to an event. Requires an update or create call afterwards. # # @return [MISP::Event] # def add_tag(tag) - tag = Tag.new(tag) unless tag.is_a?(MISP::Tag) + tag = Tag.new(**tag) unless tag.is_a?(MISP::Tag) tags << tag self end class << self