Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/rails_extend/core/pathname.rb
Instance Method Summary collapse
-
#existence ⇒ Object
like present? and presence if exist? return self.
-
#without_extname ⇒ Object
xx.html.erb => xx.
Instance Method Details
#existence ⇒ Object
like present? and presence if exist? return self
5 6 7 |
# File 'lib/rails_extend/core/pathname.rb', line 5 def existence self if exist? end |
#without_extname ⇒ Object
xx.html.erb => xx
10 11 12 13 |
# File 'lib/rails_extend/core/pathname.rb', line 10 def without_extname suffix = basename.to_s.split('.')[0] dirname.join(suffix) end |