Sha256: b67116a38f68c51a5c8c27f987330779ab32d54599b19263c100f44629d2349f
Contents?: true
Size: 712 Bytes
Versions: 17
Compression:
Stored size: 712 Bytes
Contents
class Blitline class Job include AttributeJsonizer attr_accessor :application_id, :src, :postback_url, :functions def initialize(image_src, application_id = nil) @src = image_src @functions = [] end def add_function(function_name, function_params, image_identifier = nil) function = Blitline::Function.new(function_name, function_params) function.add_save(image_identifier) if image_identifier @functions << function return function end def validate raise "Job must have an application_id" if @application_id.nil? raise "Job must have an image_src to work on" if @src.nil? @functions.each { |f| f.validate } end end end
Version data entries
17 entries across 17 versions & 1 rubygems