Sha256: 4af54805dfbd32414ddba664bca5a0e2402883d3bc1e8bf37d8dd98808d46f58
Contents?: true
Size: 1.08 KB
Versions: 21
Compression:
Stored size: 1.08 KB
Contents
require 'fog/core/model' module Fog module SakuraCloud class Script class Note < Fog::Model identity :id, :aliases => 'ID' attribute :name, :aliases => 'Name' attribute :note_class, :aliases => 'Class' attribute :scope, :aliases => 'Scope' attribute :content, :aliases => 'Content' attribute :description, :aliases => 'Description' attribute :remark, :aliases => 'Remark' attribute :availability, :aliases => 'Availability' attribute :icon, :aliases => 'Icon' def delete service.delete_note(identity) true end alias_method :destroy, :delete def save requires :name, :content if identity Fog::Logger.warning("Update Note #{identity}") data = service.modify_note(@attributes).body["Note"] else Fog::Logger.warning("Create New Note") data = service.create_note(@attributes).body["Note"] end merge_attributes(data) true end end end end end
Version data entries
21 entries across 19 versions & 2 rubygems