Navigation Menu

Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 28, 2014
1 parent f1d9599 commit 70d3cfd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/droonga/catalog_generator.rb
Expand Up @@ -27,7 +27,11 @@ class CatalogGenerator

class << self
def generate(datasets_params)
new(datasets_params).generate
generator = new
datasets_params.each do |name, params|
add_dataset(name, params)
end
generator.generate
end

def update_params(base_params, modifications)
Expand All @@ -48,16 +52,10 @@ def update_params(base_params, modifications)
end
end

def initialize(datasets_params=nil)
def initialize
@version = 2
@effective_date = Time.now
@datasets = {}

if datasets_params
datasets_params.each do |name, params|
add_dataset(name, params)
end
end
end

def add_dataset(name, options)
Expand Down

0 comments on commit 70d3cfd

Please sign in to comment.