lib/express_templates/components/configurable.rb in express_templates-0.9.4 vs lib/express_templates/components/configurable.rb in express_templates-0.9.5
- old
+ new
@@ -45,13 +45,13 @@
def config
@config ||= {}
end
- def self.has_option(name, description, type: :text, required: nil, default: nil, attribute: nil)
+ def self.has_option(name, description, type: :string, required: nil, default: nil, attribute: nil, values: nil)
raise "name must be a symbol" unless name.kind_of?(Symbol)
option_definition = {description: description}
- option_definition.merge!(type: type, required: required, default: default, attribute: attribute)
+ option_definition.merge!(type: type, required: required, default: default, attribute: attribute, values: values)
self.supported_options =
self.supported_options.merge(name => option_definition)
end
def required_options
\ No newline at end of file