Class: Rabbit::Command::RabbitSlide::SlideMarkupLanguageMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbit/command/rabbit-slide.rb

Instance Method Summary collapse

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.author_conf.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.author_conf.markup_language
end