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.
390 391 392 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 390 def initialize(data) @data = data end |
Instance Method Details
#apply(combo_box) ⇒ Object
402 403 404 405 406 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 402 def apply(combo_box) id = combo_box.active_id id = id.to_sym if id @data..markup_language = id end |
#attach(combo_box) ⇒ Object
394 395 396 397 398 399 400 |
# File 'lib/rabbit/command/rabbit-slide.rb', line 394 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 |