Module: Filigree::TypedClass
- Includes:
- ClassMethodsModule
- Defined in:
- lib/filigree/types.rb
Overview
Allows the including class to define typed type checked instance variables. This also provides a default constructor.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#set_typed_ivars(vals) ⇒ void
Set each of the typed instance variables to its corresponding value.
Methods included from ClassMethodsModule
Instance Method Details
#set_typed_ivars(vals) ⇒ void
This method returns an undefined value.
Set each of the typed instance variables to its corresponding value.
87 88 89 90 91 |
# File 'lib/filigree/types.rb', line 87 def set_typed_ivars(vals) self.class.typed_ivars.zip(vals).each do |name, val| self.send("#{name}=", val) end end |