Sha256: 97e4bd1344b59dfd73db7fcdc49e90477d292f70756be764ef327348c25bfc61

Contents?: true

Size: 434 Bytes

Versions: 7

Compression:

Stored size: 434 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

7 entries across 7 versions & 1 rubygems

Version Path
sdb_dal-0.0.8 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.7 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.5 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.12 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.11 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.6 ./lib/sdb_dal/lazy_loading_text.rb
sdb_dal-0.0.9 ./lib/sdb_dal/lazy_loading_text.rb