Class: Zubat::FlogWrapper
- Inherits:
-
Object
- Object
- Zubat::FlogWrapper
- Defined in:
- lib/zubat/flog_wrapper.rb
Constant Summary collapse
- Flog =
Data.define(:average, :total_score)
Instance Method Summary collapse
Instance Method Details
#examine(code) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/zubat/flog_wrapper.rb', line 11 def examine(code) flog = ::Flog.new Tempfile.open do |file| file.print(code) file.close flog.flog(file.path) Flog.new(average: flog.average, total_score: flog.total_score) end end |