Class: ThemeSettingsManager::String
Instance Attribute Summary
#default, #name, #theme
Instance Method Summary
collapse
create, #create_record!, #db_record, #description, #ensure_is_valid_value!, #has_max?, #has_min?, #has_record?, #initialize, #invalid_value_error_message, #requests_refresh?, #type, #type_name, types, #value, #value=
Instance Method Details
#is_valid_value?(new_value) ⇒ Boolean
113
114
115
|
# File 'lib/theme_settings_manager.rb', line 113
def is_valid_value?(new_value)
(@opts[:min]..@opts[:max]).include? new_value.to_s.length
end
|
#json_schema ⇒ Object
121
122
123
124
125
126
127
|
# File 'lib/theme_settings_manager.rb', line 121
def json_schema
begin
JSON.parse(@opts[:json_schema])
rescue StandardError
false
end
end
|
#textarea ⇒ Object
117
118
119
|
# File 'lib/theme_settings_manager.rb', line 117
def textarea
@opts[:textarea]
end
|