Sha256: 699c7c0196c599d2a167772b7b4b1eba9d2c86e44db40b0154160bd43c61127f

Contents?: true

Size: 474 Bytes

Versions: 12

Compression:

Stored size: 474 Bytes

Contents

module Coprl::Presenters::WebClient::Helpers::Sinatra
  module LocalVariables
    # A sinatra 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(:locals)
      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/sinatra/local_variables.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/web_client/helpers/sinatra/local_variables.rb