Class: Ruby2sass::SelectorContext
- Inherits:
-
Object
- Object
- Ruby2sass::SelectorContext
- Defined in:
- lib/ruby2sass/renderer.rb
Instance Method Summary collapse
-
#initialize(renderer) ⇒ SelectorContext
constructor
A new instance of SelectorContext.
- #method_missing(method_name, *args, &block) ⇒ Object
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 |