Class: Jamef::Receiver

Inherits:
OpenStruct
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/jamef/receiver.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Receiver

Returns a new instance of Receiver.

Raises:

  • (ArgumentError)


12
13
14
15
16
# File 'lib/jamef/receiver.rb', line 12

def initialize *args
  super
  raise ArgumentError, errors.first unless self.valid?
  self
end

Instance Method Details

#contrib?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/jamef/receiver.rb', line 18

def contrib?
  contrib.present?
end