Class: DirectInject::Templates::Abstract
- Inherits:
-
Object
- Object
- DirectInject::Templates::Abstract
- Includes:
- Tagz
- Defined in:
- lib/direct_inject/templates/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source, options) ⇒ Abstract
constructor
A new instance of Abstract.
- #tag_options(options) ⇒ Object
Constructor Details
#initialize(source, options) ⇒ Abstract
Returns a new instance of Abstract.
19 20 21 22 |
# File 'lib/direct_inject/templates/abstract.rb', line 19 def initialize( source , ) @source = source @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/direct_inject/templates/abstract.rb', line 15 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
15 16 17 |
# File 'lib/direct_inject/templates/abstract.rb', line 15 def source @source end |
Class Method Details
.render(*args, &block) ⇒ Object
11 12 13 |
# File 'lib/direct_inject/templates/abstract.rb', line 11 def self.render( *args , &block ) new( *args , &block ).render end |
Instance Method Details
#tag_options(options) ⇒ Object
24 25 26 27 28 |
# File 'lib/direct_inject/templates/abstract.rb', line 24 def ( ) = Map.for = .depth_first_keys.map { | k | k.map( &:to_s ).join '-' } Hash[ .zip .depth_first_values ] end |