Sha256: 7c25b7a26981d5c225ee8e1b6e2e4ad67c73e8ade178924c915190636adcf4dc

Contents?: true

Size: 405 Bytes

Versions: 5

Compression:

Stored size: 405 Bytes

Contents

class ParsedMethod

  include PoroPlus

  attr_accessor :name, :content, :type, :complexity

  def complexity
    @complexity ||= analyzer.complexity
  end

  def name
    return "" if self.type == :none
    "#{prefix}#{@name}"
  end

  def prefix
    return "." if self.type == :class
    return "#" if self.type == :instance
    return "*"
  end

  def analyzer
    Analyzer.new(self.content)
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fukuzatsu-1.0.4 lib/fukuzatsu/parsed_method.rb
fukuzatsu-1.0.3 lib/fukuzatsu/parsed_method.rb
fukuzatsu-1.0.2 lib/fukuzatsu/parsed_method.rb
fukuzatsu-1.0.1 lib/fukuzatsu/parsed_method.rb
fukuzatsu-1.0.0 lib/fukuzatsu/parsed_method.rb