Sha256: e6412249350a865bb45e029baf723860f94c7d0b1fb3d9a216da177acf8552f3

Contents?: true

Size: 327 Bytes

Versions: 10

Compression:

Stored size: 327 Bytes

Contents

module Rooftop
  class Author
    def initialize(args)
      args.each do |k,v|
        instance_variable_set("@#{k}", v)
        self.class.send(:attr_accessor, k)
      end
    end

    def id
      self.instance_variable_get(:"@ID")
    end

    def ==(other)
      other.respond_to?(:id) && other.id == id
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rooftop-0.1.4.1 lib/rooftop/models/author.rb
rooftop-0.1.4 lib/rooftop/models/author.rb
rooftop-0.1.3 lib/rooftop/models/author.rb
rooftop-0.1.2 lib/rooftop/models/author.rb
rooftop-0.1.1 lib/rooftop/models/author.rb
rooftop-0.0.7.4 lib/rooftop/models/author.rb
rooftop-0.0.6 lib/rooftop/models/author.rb
rooftop-0.0.5 lib/rooftop/models/author.rb
rooftop-0.0.3 lib/rooftop/models/author.rb
rooftop-0.0.1 lib/rooftop_client/models/author.rb