./lib/animoto/resources/jobs/base.rb in animoto-1.0.0 vs ./lib/animoto/resources/jobs/base.rb in animoto-1.1.0
- old
+ new
@@ -13,9 +13,17 @@
# @return [String]
def self.infer_content_type
super + '_job'
end
+ def self.endpoint path = nil
+ super || infer_endpoint
+ end
+
+ def self.infer_endpoint
+ "/jobs/#{name.split('::').last.underscore}"
+ end
+
# The URL for this job.
# @return [String]
attr_reader :url
# The state of this job.
\ No newline at end of file