Class: Rabbit::Command::RabbitSlide::SlideMarkupLanguageMapper
- Inherits:
-
Object
- Object
- Rabbit::Command::RabbitSlide::SlideMarkupLanguageMapper
- Defined in:
- lib/rabbit/command/rabbit-slide.rb
Instance Method Summary collapse
- #apply(combo_box) ⇒ Object
- #attach(combo_box) ⇒ Object
-
#initialize(data) ⇒ SlideMarkupLanguageMapper
constructor
A new instance of SlideMarkupLanguageMapper.
Constructor Details
#initialize(data) ⇒ SlideMarkupLanguageMapper
Returns a new instance of SlideMarkupLanguageMapper.
358 359 360 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 358 def initialize(data) @data = data end |
Instance Method Details
#apply(combo_box) ⇒ Object
370 371 372 373 374 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 370 def apply(combo_box) id = combo_box.active_id id = id.to_sym if id @data..markup_language = id end |
#attach(combo_box) ⇒ Object
362 363 364 365 366 367 368 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 362 def attach(combo_box) combo_box = combo_box @data.available_markup_languages.each do |key, value| combo_box.append(key.to_s, value) end combo_box.active_id = @data..markup_language end |