mustmodify / valuable

quick ruby modeling -- basically attr_accessor with default values, light-weight casting, and a constructor
http://valuable.mustmodify.com/
MIT License
72 stars 3 forks source link

option :allow_blank => false should prevent blank values from being set. #27

Closed mustmodify closed 8 years ago

mustmodify commented 8 years ago
class Device
  has_value :battery_percent, :allow_blank => false, :klass => :decimal
end

Message.new(battery_percent: '').sender.should == nil