Sha256: d04cbdaa5413c0ad1e078bd0f6a8dcafabc6282847225b1aa05568147a2672b0

Contents?: true

Size: 362 Bytes

Versions: 7

Compression:

Stored size: 362 Bytes

Contents

require 'ostruct'
require 'active_model'

module Jamef
  
  class Receiver < OpenStruct
    
    include ActiveModel::Validations
    
    validates :zip, presence: true
    
    def initialize *args
      super
      raise ArgumentError, errors.first unless self.valid?
      self
    end
    
    def contrib?
      contrib.present?
    end
    
    
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jamef-api-0.5.6 lib/jamef/receiver.rb
jamef-api-0.5.5 lib/jamef/receiver.rb
jamef-api-0.5.4 lib/jamef/receiver.rb
jamef-api-0.5.3 lib/jamef/receiver.rb
jamef-api-0.5.2 lib/jamef/receiver.rb
jamef-api-0.5.1 lib/jamef/receiver.rb
jamef-api-0.5.0 lib/jamef/receiver.rb