Class: Inertia::GroupedMass
Overview
A group of masses, probably a directory.
Instance Attribute Summary collapse
-
#masses ⇒ Object
readonly
Returns the value of attribute masses.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, masses) ⇒ GroupedMass
constructor
A new instance of GroupedMass.
- #lines ⇒ Object
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
#masses ⇒ Object (readonly)
Returns the value of attribute masses.
8 9 10 |
# File 'lib/inertia/grouped_mass.rb', line 8 def masses @masses end |
#path ⇒ Object (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
#lines ⇒ Object
10 11 12 |
# File 'lib/inertia/grouped_mass.rb', line 10 def lines masses.sum(&:lines) end |