Class: Clerk::Models::Components::Role
- Inherits:
-
Object
- Object
- Clerk::Models::Components::Role
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/role.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object:, id:, name:, key:, is_creator_eligible:, permissions:, created_at:, updated_at:, description: nil) ⇒ Role
constructor
A new instance of Role.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(object:, id:, name:, key:, is_creator_eligible:, permissions:, created_at:, updated_at:, description: nil) ⇒ Role
Returns a new instance of Role.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/clerk/models/components/role.rb', line 37 def initialize(object:, id:, name:, key:, is_creator_eligible:, permissions:, created_at:, updated_at:, description: nil) @object = object @id = id @name = name @key = key @is_creator_eligible = is_creator_eligible = @created_at = created_at @updated_at = updated_at @description = description end |
Instance Method Details
#==(other) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/clerk/models/components/role.rb', line 50 def ==(other) return false unless other.is_a? self.class return false unless @object == other.object return false unless @id == other.id return false unless @name == other.name return false unless @key == other.key return false unless @is_creator_eligible == other.is_creator_eligible return false unless == other. return false unless @created_at == other.created_at return false unless @updated_at == other.updated_at return false unless @description == other.description true end |