Class: Pimento::HorizontalLineComponent

Inherits:
Component
  • Object
show all
Defined in:
lib/pimento/component.rb

Instance Attribute Summary collapse

Attributes inherited from Component

#x, #y

Instance Method Summary collapse

Methods inherited from Component

for, handles, #num_objects, #render_object, #render_object_record, #template_name

Methods included from Renderable

#render

Constructor Details

#initialize(canvas, x, y, width) ⇒ HorizontalLineComponent

Returns a new instance of HorizontalLineComponent.



51
52
53
54
# File 'lib/pimento/component.rb', line 51

def initialize(canvas, x, y, width)
  super(canvas, x, y)
  @width = width
end

Instance Attribute Details

#widthObject

Returns the value of attribute width.



49
50
51
# File 'lib/pimento/component.rb', line 49

def width
  @width
end