Class: Haml::Util::StaticConditionalContext

### Home Classes Methods

### In Files

- lib/haml/util.rb

### Parent

Object

### Methods

- ::new
- #method_missing

### Class/Module Index

Quicksearch

- Haml
- Haml::Buffer
- Haml::Compiler
- Haml::Engine
- Haml::Error
- Haml::ErubisTemplateHandler
- Haml::Exec
- Haml::Exec::Generic
- Haml::Exec::Haml
- Haml::Filters
- Haml::Filters::Base
- Haml::Filters::Cdata
- Haml::Filters::Css
- Haml::Filters::Erb
- Haml::Filters::Escaped
- Haml::Filters::Javascript
- Haml::Filters::Plain
- Haml::Filters::PrecompiledTiltFilter
- Haml::Filters::Preserve
- Haml::Filters::Ruby
- Haml::Filters::SassRailsTemplate
- Haml::Filters::ScssRailsTemplate
- Haml::Filters::TiltFilter
- Haml::Helpers
- Haml::Helpers::ActionViewExtensions
- Haml::Helpers::ErrorReturn
- Haml::Helpers::XssMods
- Haml::Options
- Haml::Parser
- Haml::Parser::Line
- Haml::Parser::ParseNode
- Haml::Plugin
- Haml::Railtie
- Haml::SafeErubisTemplate
- Haml::SyntaxError
- Haml::Template
- Haml::Util
- Haml::Util::StaticConditionalContext
- ActionView
- ActionView::Base
- ActionView::Helpers
- ActionView::Helpers::CaptureHelper
- ActionView::Helpers::FormHelper
- ActionView::Helpers::FormTagHelper
- ActionView::Helpers::HamlSupport
- ActionView::Helpers::InstanceTag
- ActionView::Helpers::TagHelper
- ActionView::Helpers::Tags
- ActionView::Helpers::Tags::TextArea
- ActionView::Helpers::TextHelper
- Object

No matching classes.

# Haml::Util::StaticConditionalContext

The context in which the ERB for {#def_static_method} will be run.

### Public Class Methods

new(set) click to toggle source

@param set [include?] The set of variables that are defined for this context.

    # File lib/haml/util.rb, line 193
    def initialize(set)
      @set = set
    end

### Public Instance Methods

method_missing(name, *args, &block) click to toggle source

Checks whether or not a variable is defined for this context.

@param name [Symbol] The name of the variable @return [Boolean]

    # File lib/haml/util.rb, line 201
    def method_missing(name, *args, &block)
      super unless args.empty? && block.nil?
      @set.include?(name)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.