Navigation Menu

Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
"_attributes" in "AttributesFormatter#format_attributes" is
verbosity. We can know "AttributesFormatter#format" formats attributes.
  • Loading branch information
kou committed Apr 8, 2014
1 parent 1b042c8 commit 2f3869a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/droonga/searcher.rb
Expand Up @@ -461,7 +461,7 @@ def format_attribute_expression(label, expression)
{"name" => label} # TODO include detailed information of expression
end

def format_attributes(attributes, table)
def format(attributes, table)
attributes.collect do |attribute|
format_attribute(attribute, table)
end
Expand All @@ -486,7 +486,7 @@ def format_attribute_expression(label, expression)
{} # TODO include detailed information of expression
end

def format_attributes(attributes, table)
def format(attributes, table)
formatted_attributes = {}
attributes.each do |attribute|
formatted_attribute = format_attribute(attribute, table)
Expand Down Expand Up @@ -627,7 +627,7 @@ def format_attributes
else
formatter = SimpleAttributesFormatter.new
end
formatter.format_attributes(output_target_attributes, @result.records)
formatter.format(output_target_attributes, @result.records)
end

def output_target_attributes
Expand Down

0 comments on commit 2f3869a

Please sign in to comment.