class AttrObject::Value
Attributes
klass[R]
value[RW]
Public Class Methods
new(klass, value)
click to toggle source
# File lib/attr_object/value.rb, line 6 def initialize klass, value @klass = klass @value = value end
Public Instance Methods
cast()
click to toggle source
# File lib/attr_object/value.rb, line 15 def cast return if @value.nil? @cast ||= @klass.new @value end
value=(val)
click to toggle source
# File lib/attr_object/value.rb, line 11 def value=(val) @value = val end