lib/metaractor/namespace.rb in metaractor-3.3.0 vs lib/metaractor/namespace.rb in metaractor-3.3.2
- old
+ new
@@ -9,11 +9,11 @@
module ClassMethods
def module_parent_name
if defined?(@parent_name)
@parent_name
else
- parent_name = name =~ /::[^:]+\z/ ? -$` : nil
+ parent_name = (name =~ /::[^:]+\z/) ? -$` : nil
@parent_name = parent_name unless frozen?
parent_name
end
end
@@ -24,11 +24,11 @@
end
parents
end
def i18n_parent_names
- module_parent_names.map {|name| underscore_module_name(name).to_sym }
+ module_parent_names.map { |name| underscore_module_name(name).to_sym }
end
private
def underscore_module_name(camel_cased_word)
@@ -38,9 +38,8 @@
word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
word.tr!("-", "_")
word.downcase!
word
end
-
end
end
end