Class: ViralLoops::Models::Participant

Inherits:
Object
  • Object
show all
Defined in:
lib/viral_loops/models/participant.rb,
lib/viral_loops/models/participant/convert.rb

Defined Under Namespace

Classes: Convert

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(referral_code:, new: false) ⇒ Participant

Returns a new instance of Participant.



8
9
10
11
# File 'lib/viral_loops/models/participant.rb', line 8

def initialize(referral_code:, new: false)
  @referral_code = referral_code
  @new = new
end

Instance Attribute Details

#newObject

Returns the value of attribute new.



6
7
8
# File 'lib/viral_loops/models/participant.rb', line 6

def new
  @new
end

#referral_codeObject

Returns the value of attribute referral_code.



6
7
8
# File 'lib/viral_loops/models/participant.rb', line 6

def referral_code
  @referral_code
end

Instance Method Details

#new?Boolean

Returns:

  • (Boolean)


13
# File 'lib/viral_loops/models/participant.rb', line 13

def new? = new