Class: DrymlRootModule::Template
- Inherits:
-
Object
- Object
- DrymlRootModule::Template
- Defined in:
- lib/dryml-overrides.rb
Instance Method Summary collapse
Instance Method Details
#wrap_source_with_metadata(content, kind, name, line, *args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dryml-overrides.rb', line 11 def (content, kind, name, line, *args) return content if name.in?(NO_METADATA_TAGS) json = DrymlFireMarker.(@template_path, kind, name, line, *args) uid = rand(10000000000) <<-source <%= timestamp#{uid} = Time.now.to_f; %(<!--[dryml]#{json}-->) %> #{content} <%= %(<!--[/dryml]{"time":"\#{((Time.now.to_f - timestamp#{uid})*1000).round}ms"}-->) %> source end |