Sha256: 2b83b68cead792f784a5423545a75f49d2226bf75925a8a323a045e764f417b7
Contents?: true
Size: 686 Bytes
Versions: 65
Compression:
Stored size: 686 Bytes
Contents
module SparkApi module Models class Portal < Base extend Finders include Concerns::Savable self.element_name = "portal" def self.my(arguments = {}) portal = collect(connection.get("/portal", arguments)).first portal = Portal.new if portal.nil? portal end def enabled? @attributes['Enabled'] == true end def enable attribute_will_change! "Enabled" @attributes['Enabled'] = true save end def disable attribute_will_change! "Enabled" @attributes['Enabled'] = false save end def post_data; attributes end end end end
Version data entries
65 entries across 65 versions & 1 rubygems