class KafoWizards::Entries::SelectorEntry

Attributes

options[RW]

Public Class Methods

entry_type() click to toggle source
# File lib/kafo_wizards/entries/selector.rb, line 16
def self.entry_type
  :selector
end
new(name, options={}) click to toggle source
Calls superclass method
# File lib/kafo_wizards/entries/selector.rb, line 6
def initialize(name, options={})
  super(name, options)
  @options = options.fetch(:options, {})
end

Public Instance Methods

validate(value) click to toggle source
# File lib/kafo_wizards/entries/selector.rb, line 11
def validate(value)
  raise KafoWizards::ValidationError.new("#{value} is not a valid option") unless options.include?(value)
  value
end