lib/rabbit/slide-configuration.rb in rabbit-2.1.1 vs lib/rabbit/slide-configuration.rb in rabbit-2.1.2
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2012 Kouhei Sutou <kou@cozmixng.org>
+# Copyright (C) 2012-2014 Kouhei Sutou <kou@cozmixng.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@@ -31,11 +31,15 @@
GEM_NAME_PREFIX = "rabbit-slide"
attr_accessor :logger
attr_accessor :id, :base_name, :tags, :presentation_date
attr_accessor :licenses
- attr_accessor :slideshare_id, :speaker_deck_id, :ustream_id, :vimeo_id
+ attr_accessor :slideshare_id
+ attr_accessor :speaker_deck_id
+ attr_accessor :ustream_id
+ attr_accessor :vimeo_id
+ attr_accessor :youtube_id
attr_writer :version
attr_accessor :author
def initialize(logger=nil)
@logger = logger || Logger.default
clear
@@ -70,10 +74,11 @@
@licenses = []
@slideshare_id = nil
@speaker_deck_id = nil
@ustream_id = nil
@vimeo_id = nil
+ @youtube_id = nil
@author = nil
end
def merge!(conf)
@id = conf["id"] || @id
@@ -82,10 +87,11 @@
@version = conf["version"] || @version
@slideshare_id = conf["slideshare_id"] || @slideshare_id
@speaker_deck_id = conf["speaker_deck_id"] || @speaker_deck_id
@ustream_id = conf["ustream_id"] || @ustream_id
@vimeo_id = conf["vimeo_id"] || @vimeo_id
+ @youtube_id = conf["youtube_id"] || @youtube_id
@tags |= (conf["tags"] || [])
@licenses |= (conf["licenses"] || [])
@author ||= AuthorConfiguration.new(@logger)
@@ -102,9 +108,10 @@
"licenses" => @licenses,
"slideshare_id" => @slideshare_id,
"speaker_deck_id" => @speaker_deck_id,
"ustream_id" => @ustream_id,
"vimeo_id" => @vimeo_id,
+ "youtube_id" => @youtube_id,
}
config["author"] = @author.to_hash if @author
config
end