Sha256: b85921440fd481d209e7edda7210af6d7fe314af2089f1e8f4214c60918260b4
Contents?: true
Size: 622 Bytes
Versions: 24
Compression:
Stored size: 622 Bytes
Contents
class Ey::Core::Model < Cistern::Model def url if self.class.attributes[:url] read_attribute(:url) else "#{self.collection.url}/#{self.id}" end end def self.range_parser(v) case v when Range then v when String then first, last = v.split("-").map(&:to_i) last ||= first Range.new(first, last) else v end end def update!(attributes) merge_attributes(attributes) save! end def save save! rescue Ey::Core::Response::Error false end def destroy destroy! rescue Ey::Core::Response::Error false end end
Version data entries
24 entries across 24 versions & 2 rubygems