Class: Rafflesia::DatabaseJoinCandidateListData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatabaseJoinCandidateListData
- Defined in:
- lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ data: :data, has_more: :has_more, next_cursor: :next_cursor, object: :object, url: :url }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#has_more ⇒ Object
Returns the value of attribute has_more.
-
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
-
#object ⇒ Object
Returns the value of attribute object.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatabaseJoinCandidateListData
constructor
A new instance of DatabaseJoinCandidateListData.
Constructor Details
#initialize(json) ⇒ DatabaseJoinCandidateListData
Returns a new instance of DatabaseJoinCandidateListData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @data = (hash[:data] || []).map { |item| item ? Rafflesia::DatabaseJoinCandidateData.new(item) : nil } @has_more = hash[:has_more] @next_cursor = hash[:next_cursor] @object = hash[:object] @url = hash[:url] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
16 17 18 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 16 def data @data end |
#has_more ⇒ Object
Returns the value of attribute has_more.
16 17 18 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 16 def has_more @has_more end |
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
16 17 18 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 16 def next_cursor @next_cursor end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 16 def object @object end |
#url ⇒ Object
Returns the value of attribute url.
16 17 18 |
# File 'lib/rafflesia/database_join_candidates/database_join_candidate_list_data.rb', line 16 def url @url end |