lib/hallmonitor/event.rb in hallmonitor-1.1.0 vs lib/hallmonitor/event.rb in hallmonitor-2.0.0

- old
+ new

@@ -7,11 +7,13 @@ attr_accessor :name, :time, :count, :tags # Builds a new event # @param name [String] the name of this event - # @param count [Number] the count of this even, defaults to 1 - def initialize(name, count=1, tags: {}) + # @param count [Number,Hash] the count of this even, defaults to 1. Can + # also be a hash of named value pairs + # @param tags [Hash<Symbol,String>] Hash of tags to values for this event + def initialize(name, count: 1, tags: {}) @name = name @time = Time.now @count = count @tags = tags end