Class: RackFlags::FullFlagPresenter
- Inherits:
-
Object
- Object
- RackFlags::FullFlagPresenter
- Defined in:
- lib/rack-flags/admin_app.rb
Instance Method Summary collapse
- #checked_attribute_for(state) ⇒ Object
- #default ⇒ Object
- #description ⇒ Object
-
#initialize(full_flag) ⇒ FullFlagPresenter
constructor
A new instance of FullFlagPresenter.
- #name ⇒ Object
Constructor Details
#initialize(full_flag) ⇒ FullFlagPresenter
Returns a new instance of FullFlagPresenter.
6 7 8 |
# File 'lib/rack-flags/admin_app.rb', line 6 def initialize(full_flag) @full_flag = full_flag end |
Instance Method Details
#checked_attribute_for(state) ⇒ Object
22 23 24 |
# File 'lib/rack-flags/admin_app.rb', line 22 def checked_attribute_for(state) state == selected_state ? 'checked' : '' end |
#default ⇒ Object
10 11 12 |
# File 'lib/rack-flags/admin_app.rb', line 10 def default @full_flag.default ? 'On' : 'Off' end |
#description ⇒ Object
18 19 20 |
# File 'lib/rack-flags/admin_app.rb', line 18 def description @full_flag.description end |
#name ⇒ Object
14 15 16 |
# File 'lib/rack-flags/admin_app.rb', line 14 def name @full_flag.name end |