FEATURE: introduces list/compact_list components

This commit is contained in:
Joffrey JAFFEUX
2018-08-03 16:41:37 -04:00
committed by GitHub
parent 072f5ce825
commit 066010db7d
20 changed files with 297 additions and 160 deletions

View File

@@ -93,8 +93,13 @@ class ThemeSettingsManager
(max.is_a?(::Integer) || max.is_a?(::Float)) && max != ::Float::INFINITY
end
class List < self; end
class String < self
class List < self
def list_type
@opts[:list_type]
end
end
class String < self
def is_valid_value?(new_value)
(@opts[:min]..@opts[:max]).include? new_value.to_s.length
end