Class: Fitment::OffsetWheel
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Attributes inherited from Wheel
#bolt_pattern, #diameter, #width
Instance Method Summary collapse
- #et ⇒ Object
-
#initialize(diameter_in, width_in, offset_in, bolt_pattern: "") ⇒ OffsetWheel
constructor
A new instance of OffsetWheel.
- #to_s ⇒ Object
Methods inherited from Wheel
Constructor Details
#initialize(diameter_in, width_in, offset_in, bolt_pattern: "") ⇒ OffsetWheel
Returns a new instance of OffsetWheel.
35 36 37 38 39 40 |
# File 'lib/fitment/wheel.rb', line 35 def initialize(diameter_in, width_in, offset_in, bolt_pattern: "") @diameter = diameter_in @width = width_in @offset = offset_in @bolt_pattern = bolt_pattern end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
33 34 35 |
# File 'lib/fitment/wheel.rb', line 33 def offset @offset end |
Instance Method Details
#et ⇒ Object
46 47 48 |
# File 'lib/fitment/wheel.rb', line 46 def et self.class.et(@offset, @width) end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/fitment/wheel.rb', line 42 def to_s "#{@diameter}x#{@width} #{@offset}\" offset #{@bolt_pattern}".strip end |