Module Haml::Util
In: lib/haml/util.rb

Methods

each_char   has?   ruby1_8?  

Included Modules

Haml::Util

Constants

RUBY_VERSION = ::RUBY_VERSION.split(".").map {|s| s.to_i}

Public Instance methods

[Source]

    # File lib/haml/util.rb, line 15
15:     def each_char(str, &block)
16:       if ruby1_8?
17:         str.each_byte(&block)
18:       else
19:         str.each_char(&block)
20:       end
21:     end

[Source]

    # File lib/haml/util.rb, line 11
11:     def has?(attr, klass, method)
12:       klass.send("#{attr}s").include?(ruby1_8? ? method.to_s : method.to_sym)
13:     end

[Source]

   # File lib/haml/util.rb, line 7
7:     def ruby1_8?
8:       Haml::Util::RUBY_VERSION[0] == 1 && Haml::Util::RUBY_VERSION[1] < 9
9:     end

[Validate]