Class: CreateRectangleBoundsContext
- Inherits:
-
Object
- Object
- CreateRectangleBoundsContext
- Defined in:
- lib/motion_sprites/interactions/contexts/create_rectangle_bounds_context.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(rect_coords) ⇒ CreateRectangleBoundsContext
constructor
A new instance of CreateRectangleBoundsContext.
Constructor Details
#initialize(rect_coords) ⇒ CreateRectangleBoundsContext
Returns a new instance of CreateRectangleBoundsContext.
6 7 8 9 10 |
# File 'lib/motion_sprites/interactions/contexts/create_rectangle_bounds_context.rb', line 6 def initialize(rect_coords) @rect_coords = rect_coords @klass = Object.new @klass.extend RectangleRoles end |
Class Method Details
.call(rect_coords) ⇒ Object
2 3 4 |
# File 'lib/motion_sprites/interactions/contexts/create_rectangle_bounds_context.rb', line 2 def self.call(rect_coords) CreateRectangleBoundsContext.new(rect_coords).call end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'lib/motion_sprites/interactions/contexts/create_rectangle_bounds_context.rb', line 12 def call @klass.make_rectangle @rect_coords end |