Sha256: cc0e800d3d476420f76c084b19d5cb8bd9ebd7a5c37ec640744e559ff198cc21
Contents?: true
Size: 502 Bytes
Versions: 16
Compression:
Stored size: 502 Bytes
Contents
module Haml module Util class << self; include Haml::Util; end RUBY_VERSION = ::RUBY_VERSION.split(".").map {|s| s.to_i} def ruby1_8? Haml::Util::RUBY_VERSION[0] == 1 && Haml::Util::RUBY_VERSION[1] < 9 end def has?(attr, klass, method) klass.send("#{attr}s").include?(ruby1_8? ? method.to_s : method.to_sym) end def each_char(str, &block) if ruby1_8? str.each_byte(&block) else str.each_char(&block) end end end end
Version data entries
16 entries across 16 versions & 4 rubygems