Class: Oksky::Chat::Object::MemosResource

Inherits:
Base
  • Object
show all
Defined in:
lib/oksky/chat/object/memos_resource.rb

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize

Constructor Details

This class inherits a constructor from Oksky::Chat::Object::Base

Instance Method Details

#created_at_unixObject



26
27
28
# File 'lib/oksky/chat/object/memos_resource.rb', line 26

def created_at_unix
  content_value("created_at_unix")
end

#idObject



6
7
8
# File 'lib/oksky/chat/object/memos_resource.rb', line 6

def id
  @src.dig("id")
end

#memoObject



30
31
32
33
34
35
36
# File 'lib/oksky/chat/object/memos_resource.rb', line 30

def memo
  if @src.has_key?('attributes')
    @src['attributes']
  else
    @src
  end
end

#relationshipsObject



38
39
40
41
42
43
44
# File 'lib/oksky/chat/object/memos_resource.rb', line 38

def relationships
  if exist_relationships?
    return @src['relationships']
  else
    {}
  end
end

#resource_idObject



10
11
12
# File 'lib/oksky/chat/object/memos_resource.rb', line 10

def resource_id
  content_value("resource_id")
end

#resource_typeObject



14
15
16
# File 'lib/oksky/chat/object/memos_resource.rb', line 14

def resource_type
  content_value("resource_type")
end

#textObject



22
23
24
# File 'lib/oksky/chat/object/memos_resource.rb', line 22

def text
  content_value("text")
end

#user_idObject



18
19
20
# File 'lib/oksky/chat/object/memos_resource.rb', line 18

def user_id
  content_value("user_id")
end