Skip to content

Instantly share code, notes, and snippets.

@saturnflyer

saturnflyer/meta.rb

Created Apr 21, 2014
Embed
What would you like to do?
mod = Module.new
mod.module_eval %{
def fill_out_#{name}(value)
checkbox = find(:#{name})
if (#{name}_checked_values.include?(value) && !checkbox.selected?) ||
(#{name}_unchecked_values.include?(value) && checkbox.selected?)
checkbox.click
end
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment