class Labelito::TemplateReader
Public Instance Methods
read(path)
click to toggle source
# File lib/Labelito/template_reader.rb, line 8 def read(path) raise Errors::TemplateNotFound unless File.exists?(path) puts "=> Fetching labels" YAML::load_file(path).map do |element| raise Errors::InvalidFormat unless element["name"] && element["color"] Label.new element["name"], element["color"] end end