lib/ruby_less.rb in rubyless-0.6.0 vs lib/ruby_less.rb in rubyless-0.7.0
- old
+ new
@@ -20,22 +20,22 @@
# Return method type (options) if the given signature is a safe method for the class.
def self.safe_method_type_for(klass, signature)
SafeClass.safe_method_type_for(klass, signature)
end
- def self.translate(string, helper)
- RubyLessProcessor.translate(string, helper)
+ def self.translate(receiver, string)
+ RubyLessProcessor.translate(receiver, string)
rescue Exception => err
if err.kind_of?(RubyLess::Error)
raise err
else
raise RubyLess::Error.new("Error parsing \"#{string}\": #{err.message.strip}")
end
end
- def self.translate_string(string, helper)
+ def self.translate_string(receiver, string)
if string =~ /\#\{/
- translate("%Q{#{string}}", helper)
+ translate(receiver, "%Q{#{string}}")
else
TypedString.new(string.inspect, :class => String, :literal => string)
end
rescue Exception => err
if err.kind_of?(RubyLess::Error)