Sha256: 551d767678baee3e0e2b8b989afa8cb23ff51b1f296c20040af9793876bb91ef
Contents?: true
Size: 441 Bytes
Versions: 8
Compression:
Stored size: 441 Bytes
Contents
module NotRelational class LazyLoadingText attr_reader :is_dirty attr_reader :has_loaded def initialize(get_text_proc) @get_text_proc=get_text_proc @has_loaded=false @is_dirty=false end def value=(v) @is_dirty=true @has_loaded=true @value=v end def value if !@did_load @value= @get_text_proc.call @has_loaded=true end return @value end end end
Version data entries
8 entries across 8 versions & 1 rubygems