Class: Oksky::Chat::Object::SuggestionsResource
- Inherits:
-
Base
- Object
- Base
- Oksky::Chat::Object::SuggestionsResource
show all
- Defined in:
- lib/oksky/chat/object/suggestions_resource.rb
Instance Method Summary
collapse
Methods inherited from Base
#[], #initialize
Instance Method Details
6
7
8
|
# File 'lib/oksky/chat/object/suggestions_resource.rb', line 6
def id
@src.dig("id")
end
|
#relationships ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/oksky/chat/object/suggestions_resource.rb', line 23
def relationships
if exist_relationships?
return @src['relationships']
else
{}
end
end
|
31
32
33
|
# File 'lib/oksky/chat/object/suggestions_resource.rb', line 31
def room_id
relationships.dig("room", "id")
end
|
#suggestion ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/oksky/chat/object/suggestions_resource.rb', line 15
def suggestion
if @src.has_key?('attributes')
@src['attributes']
else
@src
end
end
|
#suggestion_messages_data ⇒ Array
11
12
13
|
# File 'lib/oksky/chat/object/suggestions_resource.rb', line 11
def suggestion_messages_data
content_value("suggestion_messages_data")
end
|