Parent

Methods

MetricFu::Flog::ScannedMethod

Attributes

line[RW]
name[RW]
operators[RW]
score[RW]

Public Class Methods

new(name, score, operators = []) click to toggle source
# File lib/generators/flog.rb, line 125
def initialize(name, score, operators = [])
  if name.match(/\.rb:\d*/)
    @line = name.match(/\.rb:\d*/).to_s.sub('.rb:','')
    name = name.match(/\S*/)
  end
  @name = name
  @score = score.to_f
  @operators = operators
end

Public Instance Methods

to_h() click to toggle source
# File lib/generators/flog.rb, line 135
def to_h
  {:name => @name,
    :score => @score,
    :operators => @operators.map {|o| o.to_h},
    :line => @line}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.