Class: XapiScraper::Models::Components::CommunityModel
- Inherits:
-
Object
- Object
- XapiScraper::Models::Components::CommunityModel
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/xapi_scraper/models/components/communitymodel.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id:, name:, description:, member_count:, members_facepile_results: nil, is_nsfw: nil, banner: nil, is_member: nil, role: nil, admin: nil, join_policy: nil, created_at: nil, invites_policy: nil, is_pinned: nil) ⇒ CommunityModel
constructor
A new instance of CommunityModel.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(id:, name:, description:, member_count:, members_facepile_results: nil, is_nsfw: nil, banner: nil, is_member: nil, role: nil, admin: nil, join_policy: nil, created_at: nil, invites_policy: nil, is_pinned: nil) ⇒ CommunityModel
Returns a new instance of CommunityModel.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/xapi_scraper/models/components/communitymodel.rb', line 110 def initialize( id:, name:, description:, member_count:, members_facepile_results: nil, is_nsfw: nil, banner: nil, is_member: nil, role: nil, admin: nil, join_policy: nil, created_at: nil, invites_policy: nil, is_pinned: nil ) @id = id @name = name @description = description @member_count = member_count @members_facepile_results = members_facepile_results @is_nsfw = is_nsfw @banner = @is_member = is_member @role = role @admin = admin @join_policy = join_policy @created_at = created_at @invites_policy = invites_policy @is_pinned = is_pinned end |
Instance Method Details
#==(other) ⇒ Object
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/xapi_scraper/models/components/communitymodel.rb', line 143 def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @name == other.name return false unless @description == other.description return false unless @member_count == other.member_count return false unless @members_facepile_results == other.members_facepile_results return false unless @is_nsfw == other.is_nsfw return false unless @banner == other. return false unless @is_member == other.is_member return false unless @role == other.role return false unless @admin == other.admin return false unless @join_policy == other.join_policy return false unless @created_at == other.created_at return false unless @invites_policy == other.invites_policy return false unless @is_pinned == other.is_pinned true end |