Skip to content

Commit

Permalink
Modified get_id method.
Browse files Browse the repository at this point in the history
get_id method calls next method if needed.
  • Loading branch information
emasaka committed Sep 3, 2009
1 parent 667e5e9 commit 6eb1619
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/plugins/defaults/stdout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,15 @@ def get(id)
end

def get_id(data)
@rtable[data]
@rtable[data] || self.next(data)
end
end

module Client
@typable_id_generator = TypableIdGenerator.new(config.plugins.stdout.typable_ids)

def self.data_to_typable_id(data)
id = config.plugins.stdout.typable_id_prefix +
(@typable_id_generator.get_id(data) || @typable_id_generator.next(data))
id = config.plugins.stdout.typable_id_prefix + @typable_id_generator.get_id(data)
end

def self.typable_id_to_data(id)
Expand Down

0 comments on commit 6eb1619

Please sign in to comment.