mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
19 lines
324 B
Ruby
19 lines
324 B
Ruby
# typed: true
|
|
module Stats
|
|
|
|
class Chart
|
|
|
|
attr_reader :action, :height, :width
|
|
def initialize(action, dimensions = {})
|
|
@action = action
|
|
@height = dimensions.fetch(:height) { 250 }
|
|
@width = dimensions.fetch(:width) { 460 }
|
|
end
|
|
|
|
def dimensions
|
|
"#{width}x#{height}"
|
|
end
|
|
|
|
end
|
|
|
|
end
|