Sha256: 35ea5a4449f58fac401219bdf1274f5742e8374949a24a9e6b494c18e03c4147
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
require 'map' require 'tagz' Tagz.i_know_what_the_hell_i_am_doing! module DirectInject module Templates class Abstract include Tagz def self.render( *args , &block ) new( *args , &block ).render end attr_reader \ :source, :options def initialize( source , options ) @source = source @options = options end def tag_options( options ) map_options = Map.for options options_keys = map_options.depth_first_keys.map { | k | k.map( &:to_s ).join '-' } Hash[ options_keys.zip map_options.depth_first_values ] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
direct_inject-0.1.0 | lib/direct_inject/templates/abstract.rb |
direct_inject-0.0.1 | lib/direct_inject/templates/abstract.rb |