instance method
extify
Ruby on Rails 4.2.9
Since v3.0.20 Last seen in v7.0.10Signature
extify(name)
Add an extension to the given name based on the platform.
Parameters
-
namereq
Source
# File railties/lib/rails/generators/actions.rb, line 260
def extify(name)
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
"#{name}.bat"
else
name
end
end
Defined in railties/lib/rails/generators/actions.rb line 260
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Actions