Sha256: 2273ac7680761e2d796e2aeb88bc221a3010d9570feee92ca9d5a5d90f7e3fc7

Contents?: true

Size: 412 Bytes

Versions: 23

Compression:

Stored size: 412 Bytes

Contents

module MeducationSDK
  class Message < Loquor::Resource
    self.path = "/messages"

    def from
      @user ||= User.find(from_id)
    end

    def thread
      @thread ||= MessageThread.find(thread_id)
    end
  end

  class MessageMock < Message
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      thread_id: 20,
      from_id: 10,
      parsed_content: "Foobar123"
    }
  end
end


Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
meducation_sdk-1.4.3 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.4.2 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.4.1 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.4.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.3.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.6 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.5 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.4 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.3 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.2 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.1 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.2.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.1.2 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.1.1 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.1.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-1.0.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-0.10.1 lib/meducation_sdk/resources/message.rb
meducation_sdk-0.10.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-0.9.0 lib/meducation_sdk/resources/message.rb
meducation_sdk-0.8.0 lib/meducation_sdk/resources/message.rb