Struct.new(:title, :due_to, :body, :self_url, :image_url)
#=> #<Class:0x007fed5b1859c0>
Check that out, Struct.new
returns a class. A class that can create instances with getters and setters for some named fields. And, of course, any class can be inherited from.
So this is simply a slightly odd way of defining a list of instance properties in the class declaration.
Which means this is funcationally the same as:
class Note
attr_accessor :title, :due_to, :body, :self_url, :image_url
end