Sha256: b873a4e99816d826ac04b50ca4d6ad7ae2bf14f7dd2abfe3813eba9aad6706c0

Contents?: true

Size: 477 Bytes

Versions: 12

Compression:

Stored size: 477 Bytes

Contents

module Coprl::Presenters::WebClient::Helpers::Rails
  module LocalVariables
    # A rails specific helper to see if a local variable is defined
    # This passes the binding from the evaluating (erb) context
    # We don't do this inline, because rails and sintra have different variable names for the same thing
    def bound_locals_include?(variable, __binding__)
      locals = __binding__.local_variable_get(:local_assigns)
      locals.include? variable
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/web_client/helpers/rails/local_variables.rb