Sha256: a4da86c2227b1e78ed73d1efbe4432b9d209e35107eda84225902f54ed3616ec

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

require "erb"
class Foo

  def initialize
    @another_key = 'bb'
    @hsh = {}
  end

  def start
    yield(self)
    self.compute
  end


  def game_one(key)
    @hsh[key] = yield
  end

  def compute
    @hsh[@another_key]
  end

  def game_two(key)
    @hsh[key] = yield
  end
end


a = Foo.new.start do |config|

  config.game_one('aa') do
    '<div>       \n   </div>'
  end

  config.game_two('bb') do
    '<div>       \n kjsdkaskfsajkfjk   </div>'
  end
end

p a

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
optimizely_server_side-0.0.6 blocky.rb
optimizely_server_side-0.0.5 blocky.rb
optimizely_server_side-0.0.4 blocky.rb