Class: Haml::Buffer
- Inherits:
-
Object
- Object
- Haml::Buffer
- Defined in:
- lib/generators/ucb_rails/templates/config/initializers/local/haml_buffer.rb
Instance Method Summary collapse
- #orig_parse_object_ref ⇒ Object
-
#parse_object_ref(ref) ⇒ Object
Override the method that figures out id/class given something like:.
Instance Method Details
#orig_parse_object_ref ⇒ Object
3 |
# File 'lib/generators/ucb_rails/templates/config/initializers/local/haml_buffer.rb', line 3 alias_method :orig_parse_object_ref, :parse_object_ref |
#parse_object_ref(ref) ⇒ Object
Override the method that figures out id/class given something like:
%tag[object]
An object/class can implement :haml_id_and_class_hash and use that rather than the default.
11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/ucb_rails/templates/config/initializers/local/haml_buffer.rb', line 11 def parse_object_ref(ref) object, = ref if object.respond_to?(:haml_attributes) object.haml_attributes() else orig_parse_object_ref(ref) end end |