Skip to content

Commit

Permalink
Change the method visibility
Browse files Browse the repository at this point in the history
Thse methods are used only inside this class
  • Loading branch information
rafaelfranca committed Feb 5, 2015
1 parent 0caac9b commit 44e1cda
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actionview/lib/action_view/helpers/tags/translator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module ActionView
module Helpers
module Tags # :nodoc:
class Translator # :nodoc:
attr_reader :object_name, :method_and_value, :i18n_scope, :model

def initialize(object, object_name, method_and_value, i18n_scope)
@object_name = object_name.gsub(/\[(.*)_attributes\]\[\d+\]/, '.\1')
@method_and_value = method_and_value
Expand All @@ -16,6 +14,10 @@ def call
translated_attribute || human_attribute_name
end

private

attr_reader :object_name, :method_and_value, :i18n_scope, :model

def i18n_default
if model
key = model.model_name.i18n_key
Expand Down

0 comments on commit 44e1cda

Please sign in to comment.