Class: Playbook::PbRadio::Radio

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::FormTagHelper, Playbook::Props
Defined in:
app/pb_kits/playbook/pb_radio/radio.rb

Instance Method Summary collapse

Methods included from Playbook::Props

#generate_classname, #initialize, #prop

Instance Method Details

#body_statusObject



39
40
41
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 39

def body_status
  error ? "negative" : nil
end

#classnameObject



27
28
29
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 27

def classname
  generate_classname("pb_radio_kit", dark_class) + error_class
end

#inputObject



31
32
33
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 31

def input
  check_box_tag(name, value, checked)
end

#selectedObject



35
36
37
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 35

def selected
  "checked" if checked == true
end