Class: Inertia::GroupedMass

Inherits:
Mass
  • Object
show all
Defined in:
lib/inertia/grouped_mass.rb

Overview

A group of masses, probably a directory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Mass

#<=>, #erb?, #extension, #haml?, #ignored?, #js?, #jsx?, #percent_overall_lines, #rabl?, #ruby_spec?, #scss?, #text?, #to_s, #ts?, #tsx?, #yml?

Constructor Details

#initialize(path, masses) ⇒ GroupedMass

Returns a new instance of GroupedMass.



4
5
6
7
# File 'lib/inertia/grouped_mass.rb', line 4

def initialize(path, masses)
  @path = path
  @masses = masses
end

Instance Attribute Details

#massesObject (readonly)

Returns the value of attribute masses.



8
9
10
# File 'lib/inertia/grouped_mass.rb', line 8

def masses
  @masses
end

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/inertia/grouped_mass.rb', line 8

def path
  @path
end

Instance Method Details

#linesObject



10
11
12
# File 'lib/inertia/grouped_mass.rb', line 10

def lines
  masses.sum(&:lines)
end