Permalink
Browse files

Small changes to the visibility variable assignment

  • Loading branch information...
mereghost committed Jun 21, 2016
1 parent 1d37fa0 commit 088ebd6f7458ac406dd434a412242ff423566408
Showing with 3 additions and 1 deletion.
  1. +2 −1 lib/hanami/view/escape.rb
  2. +1 −0 test/escape_test.rb
@@ -165,8 +165,9 @@ def self.extended(base)
# @since 0.4.0
# @api private
def method_added(method_name)
visibility = :public
visibility = :private if private_method_defined? method_name
visibility ||= :protected if protected_method_defined? method_name
visibility = :protected if protected_method_defined? method_name

unless autoescape_methods[method_name]
prepend Module.new {
@@ -52,5 +52,6 @@
it "does not alter the method visibility" do
Users::Show.private_instance_methods.must_include(:private_username)
Users::Show.protected_instance_methods.must_include(:protected_username)
Users::Show.public_instance_methods.must_include(:raw_username)
end
end

0 comments on commit 088ebd6

Please sign in to comment.