Sha256: b09ce4f95546c0b0b5d6ff9150b9b8e4e117e13d00647bdf42b6a56bf84a972e
Contents?: true
Size: 565 Bytes
Versions: 1
Compression:
Stored size: 565 Bytes
Contents
module Einvoice module Model class Contact < Einvoice::Model::Base attr_accessor :name, :address, :t_e_l, :email validates :name, presence: true, length: { maximum: 64 } validates :address, presence: true, length: { maximum: 128 } validates :t_e_l, length: { maximum: 64 } validates :email, length: { maximum: 512 } def initialize(attributes={}) attributes.each do |attribute, value| instance_variable_set("@#{attribute}", value) if respond_to?(attribute.to_sym) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
einvoice-0.1.0 | lib/einvoice/model/contact.rb |