class JpStringsFinder::FiletypeDetector
Attributes
filetype[R]
Public Class Methods
new(file_path)
click to toggle source
# File lib/jp_strings_finder/filetype_detector.rb, line 5 def initialize(file_path) @filetype = case File.extname(file_path) when ".rb" :ruby when ".erb" :erb when ".slim" :slim else raise "Unsupported filetype [#{file_path}]" end end