mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
18 lines
310 B
Ruby
18 lines
310 B
Ruby
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
|