Skip to content

Commit

Permalink
TaggableString#initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
delano committed Jul 28, 2010
1 parent 83d3b60 commit be3c95c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/benelux/stats.rb
Expand Up @@ -155,7 +155,7 @@ def samples(*args)
args.flatten.each { |s| sample(s) }
end

def merge!(other)
def merge!(other)
return self if other.n == 0
if @n == 0
@min, @max = other.min, other.max
Expand Down
4 changes: 4 additions & 0 deletions lib/selectable.rb
Expand Up @@ -87,4 +87,8 @@ class SelectableHash < Hash

class TaggableString < String
include Selectable::Object
def initialize(str, tags={})
super(str)
add_tags tags unless tags.empty?
end
end

0 comments on commit be3c95c

Please sign in to comment.