Sha256: 79cd549a48b18f9bea612266def791c82ce77d301cba84dd362384eaac119362

Contents?: true

Size: 432 Bytes

Versions: 4

Compression:

Stored size: 432 Bytes

Contents

module SdbDal
 

class LazyLoadingText
  attr_reader :is_dirty
   attr_reader :has_loaded
  def initialize(get_clob_proc)
    @get_clob_proc=get_clob_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_clob_proc.call      
        @has_loaded=true          
    end
    return @value
    
  end
end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sdb_dal-0.0.1 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.2 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.3 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.4 ./lib/sdb_dal/lazy_loading_text.rb