Class: Rafflesia::InvalidatedJoin

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/registry/invalidated_join.rb

Constant Summary collapse

HASH_ATTRS =
{
  approval: :approval,
  evidence: :evidence,
  reason: :reason
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ InvalidatedJoin

Returns a new instance of InvalidatedJoin.



19
20
21
22
23
24
25
# File 'lib/rafflesia/registry/invalidated_join.rb', line 19

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @approval = hash[:approval] ? Rafflesia::JoinApproval.new(hash[:approval]) : nil
  @evidence = hash[:evidence] ? Rafflesia::JoinEvidence.new(hash[:evidence]) : nil
  @reason = hash[:reason]
end

Instance Attribute Details

#approvalObject

Returns the value of attribute approval.



14
15
16
# File 'lib/rafflesia/registry/invalidated_join.rb', line 14

def approval
  @approval
end

#evidenceObject

Returns the value of attribute evidence.



14
15
16
# File 'lib/rafflesia/registry/invalidated_join.rb', line 14

def evidence
  @evidence
end

#reasonObject

Returns the value of attribute reason.



14
15
16
# File 'lib/rafflesia/registry/invalidated_join.rb', line 14

def reason
  @reason
end