Class: Account::Inviter::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/account/inviter.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invited: nil, email: nil, account: nil, messages: []) ⇒ void

Parameters:

  • invited (Boolean, nil) (defaults to: nil)

    whether the invitation succeeded

  • email (String, nil) (defaults to: nil)

    email the invitation was sent to

  • account (Account, nil) (defaults to: nil)

    the invited (or existing) account

  • messages (Array<String>) (defaults to: [])

    human-readable outcome messages



11
# File 'app/services/account/inviter.rb', line 11

def initialize(invited: nil, email: nil, account: nil, messages: []) = super

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account

Returns:

  • (Object)

    the current value of account



5
6
7
# File 'app/services/account/inviter.rb', line 5

def 
  @account
end

#emailObject (readonly)

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



5
6
7
# File 'app/services/account/inviter.rb', line 5

def email
  @email
end

#invitedObject (readonly)

Returns the value of attribute invited

Returns:

  • (Object)

    the current value of invited



5
6
7
# File 'app/services/account/inviter.rb', line 5

def invited
  @invited
end

#messagesObject (readonly)

Returns the value of attribute messages

Returns:

  • (Object)

    the current value of messages



5
6
7
# File 'app/services/account/inviter.rb', line 5

def messages
  @messages
end

Instance Method Details

#invited?Boolean

Whether the invitation succeeded.

Returns:

  • (Boolean)


15
# File 'app/services/account/inviter.rb', line 15

def invited? = invited