class Kameleon::DSL::Verify::CheckBoxInput

Attributes

conditions[R]
value[R]

Public Class Methods

new(value, *params) click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 285
def initialize(value, *params)
  @value = value
  @conditions = []
  parse_params(params)
end

Private Instance Methods

matcher_method() click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 304
def matcher_method
  case value
    when :checked, :check
      :have_checked_field
    when :unchecked, :uncheck
      :have_unchecked_field
    else
      raise "not supported"
  end
end
parse_params(params) click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 293
def parse_params(params)
  case params
    when String
      conditions << Condition.new(matcher_method, params)
    when Array
      params.each { |param| parse_params(param) }
    else
      raise "not supported"
  end
end