Sha256: cad9f37c520c15915b189a093c861bd815e156b102ec8096256b96aca00b4457

Contents?: true

Size: 546 Bytes

Versions: 33

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Utils
    module RubyExec
      def self.search_data_for_ruby_code(convertible)
        return if convertible.data.empty?

        # Iterate using `keys` here so inline Ruby script can add new data keys
        # if necessary without an error
        data_keys = convertible.data.keys
        data_keys.each do |k|
          v = convertible.data[k]
          next unless v.is_a?(Proc)

          convertible.data[k] = convertible.instance_exec(&v)
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.3 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.2 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.1 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.0 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.1.0 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.1.0.beta1 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.0.0 lib/bridgetown-core/utils/ruby_exec.rb
bridgetown-core-1.0.0.beta3 lib/bridgetown-core/utils/ruby_exec.rb