class Lebowski::Foundation::Views::SelectButtonMenu

Attributes

select_button[W]

Public Instance Methods

item_checked?(title) click to toggle source
# File lib/lebowski/foundation/views/select_button.rb, line 53
def item_checked?(title)
  raise "The checkbox option is not enabled for this select button." if not @select_button.checkbox_enabled?
  menu_item = nil
  if title.kind_of? String
    menu_item = menu_items.find_first({ :title => /^#{title}$/i })
  elsif title.kind_of? Regexp
    menu_item = menu_items.find_first({ :title => title })
  else
    raise ArgumentInvalidTypeError.new "title", title, String, Regexp
  end
  return menu_item['content.checkbox']
end