Class: Ruby2sass::SelectorContext

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby2sass/renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(renderer) ⇒ SelectorContext

Returns a new instance of SelectorContext.



175
176
177
# File 'lib/ruby2sass/renderer.rb', line 175

def initialize(renderer)
  @renderer = renderer
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



179
180
181
182
# File 'lib/ruby2sass/renderer.rb', line 179

def method_missing(method_name, *args, &block)
  selector = "&:#{method_name}"
  @renderer.s(selector, &block)
end