Class: User::SignUpInvites::Null

Inherits:
Struct
  • Object
show all
Includes:
ActiveModel::Validations, NullObjectPersistable
Defined in:
app/models/user/sign_up_invites/invite.rb

Overview

A Null invite is an invite-like object created when the invite code is not valid. It will

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from NullObjectPersistable

#[], #[]=, #destroyed?, #has_attribute?, #id, #is_a?, #marked_for_destruction?, #new_record?, #real_model_class

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *arguments) ⇒ Object



37
38
39
40
# File 'app/models/user/sign_up_invites/invite.rb', line 37

def method_missing method_name, *arguments
  return nil if [:stack, :sender, :recipient].include? method_name
  super 
end

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



30
31
32
# File 'app/models/user/sign_up_invites/invite.rb', line 30

def code
  @code
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'app/models/user/sign_up_invites/invite.rb', line 42

def persisted?
  true
end