class Express::Base

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/express/base.rb, line 5
def initialize(attributes = {})
  if attributes.is_a?(Hash)
    (required_attributes + optional_attributes).each do |key|
      value = if numeric_attribute?(key)
                Util.to_numeric(attributes[key])
              else
                attributes[key]
              end
      send "#{key}=", value
    end
  end
  attr_missing!
end