Sha256: 4cd672a423415d265f384e6a4ce5e9f46917f565faad8092fb44e37392e526cc

Contents?: true

Size: 361 Bytes

Versions: 23

Compression:

Stored size: 361 Bytes

Contents

module MyJohnDeere
  class SingleResource < Requestable
    include RESTMethods
    include JSONAttributes
    attr_accessor :deleted

    def initialize(json_object, access_token = nil)
      super(json_object, access_token)
      setup_attributes(json_object)
      self.deleted = self.links.any? { |link_hash| link_hash["rel"] == "delete" }
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
myjohndeere-0.1.11 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.10 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.9 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.8 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.7 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.6 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.5 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.4 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.3 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.2 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.1 lib/myjohndeere/single_resource.rb
myjohndeere-0.1.0 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.11 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.10 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.9 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.8 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.7 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.6 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.5 lib/myjohndeere/single_resource.rb
myjohndeere-0.0.4 lib/myjohndeere/single_resource.rb