Class: HasHelpers::Cards::RemoteRole

Inherits:
Struct
  • Object
show all
Defined in:
lib/has_helpers/cards/remote_role.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



5
6
7
# File 'lib/has_helpers/cards/remote_role.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/has_helpers/cards/remote_role.rb', line 5

def name
  @name
end

#organization_idObject

Returns the value of attribute organization_id

Returns:

  • (Object)

    the current value of organization_id



5
6
7
# File 'lib/has_helpers/cards/remote_role.rb', line 5

def organization_id
  @organization_id
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



12
13
14
# File 'lib/has_helpers/cards/remote_role.rb', line 12

def ==(other)
  other.is_a?(RemoteRole) && other.id == id
end

#persisted?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/has_helpers/cards/remote_role.rb', line 8

def persisted?
  true
end

#to_hObject



18
19
20
21
22
23
24
# File 'lib/has_helpers/cards/remote_role.rb', line 18

def to_h
  {
    id: id,
    name: name,
    organization_id: organization_id
  }
end