Sha256: 2e6d36d73b65e8affc4c7d2db93db77403c001844e7f39db1cc2f534a4bd95fc
Contents?: true
Size: 477 Bytes
Versions: 664
Compression:
Stored size: 477 Bytes
Contents
module Caboose class Message include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor :name, :email, :body validates :name, :email, :body, presence: true validates :email, format: { :with => %r{.+@.+\..+} }, allow_blank: false def initialize(attributes={}) attributes.each { |name, value| send("#{name}=", value) } end def persisted? false end end end
Version data entries
664 entries across 664 versions & 1 rubygems