lib/rabbit/slide-configuration.rb in rabbit-3.0.1 vs lib/rabbit/slide-configuration.rb in rabbit-3.0.2
- old
+ new
@@ -44,10 +44,11 @@
attr_accessor :youtube_id
attr_writer :version
attr_accessor :author
attr_accessor :width
attr_accessor :height
+ attr_accessor :source_code_uri
def initialize(logger=nil)
@logger = logger || Logger.default
clear
end
@@ -97,10 +98,11 @@
@vimeo_id = nil
@youtube_id = nil
@author = nil
@width = 800
@height = 600
+ @source_code_uri = nil
end
def merge!(conf)
@id = conf["id"] || @id
@@ -123,10 +125,11 @@
@author ||= AuthorConfiguration.new(@logger)
@author.merge!(conf["author"] || {})
@width = conf["width"] || @width
@height = conf["height"] || @height
+ @source_code_uri = conf["source_code_uri"] || @source_code_uri
end
def to_hash
config = {
"id" => @id,
@@ -141,9 +144,10 @@
"speaker_deck_id" => @speaker_deck_id,
"vimeo_id" => @vimeo_id,
"youtube_id" => @youtube_id,
"width" => @width,
"height" => @height,
+ "source_code_uri" => @source_code_uri,
}
config["author"] = @author.to_hash if @author
config
end