lib/danica/wrapper/variable.rb in danica-2.4.0 vs lib/danica/wrapper/variable.rb in danica-2.4.1
- old
+ new
@@ -1,14 +1,19 @@
module Danica
class Wrapper::Variable
- include ActiveModel::Model
include BaseOperations
include Common
attr_accessor :value, :name, :latex, :gnu
default_value :priority, 10
default_value :is_grouped?, false
+
+ def initialize(attributes={})
+ attributes.each do |key, value|
+ self.public_send("#{key}=", value)
+ end
+ end
def to_f
value.nil? ? raise(Exception::NotDefined) : value.to_f
end