mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 14:24:27 +08:00
16 lines
253 B
Ruby
16 lines
253 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class ThemeSettingsManager::Integer < ThemeSettingsManager
|
||
|
def self.cast(value)
|
||
|
value.to_i
|
||
|
end
|
||
|
|
||
|
def value
|
||
|
self.class.cast(super)
|
||
|
end
|
||
|
|
||
|
def value=(new_value)
|
||
|
super(self.class.cast(new_value))
|
||
|
end
|
||
|
end
|