Created
September 8, 2014 15:50
-
-
Save magicmarkker/0aa1ae70ae0d04795436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def map_style(field, args={}) | |
args.reverse_merge!(font: "Helvetica", color: "#000000", size: "18px", style: "normal") | |
(agenda, name, type) = field.split("_") | |
if self.agenda_styles.nil? or self.agenda_styles[name.to_sym].nil? | |
self.send("#{field}=", args[type.to_sym]) | |
else | |
self.send("#{field}=", self.agenda_styles[name.to_sym][type.to_sym]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment