Sha256: 3ceb30c3004de2e648276f3b14dac0a02113fc740482dd23ff9495423267a98b

Contents?: true

Size: 436 Bytes

Versions: 25

Compression:

Stored size: 436 Bytes

Contents

class Template
  class Node
    class Part < Node
      def initialize(part)
        if part.key?(:text)
          @part = ::Template::Node::TextPart.new(part[:text])
        elsif part.key?(:code)
          @part = ::Template::Node::CodePart.new(part[:code])
        else
          raise NotImplementedError.new(part.inspect)
        end
      end

      def evaluate(**args)
        @part.evaluate(**args)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
template-ruby-0.6.3 lib/template/node/part.rb
template-ruby-0.6.2 lib/template/node/part.rb
template-ruby-0.6.1 lib/template/node/part.rb
template-ruby-0.6.0 lib/template/node/part.rb
template-ruby-0.5.6 lib/template/node/part.rb
language-ruby-0.5.6 lib/template/node/part.rb
code-ruby-0.5.6 lib/template/node/part.rb
template-ruby-0.5.5 lib/template/node/part.rb
language-ruby-0.5.5 lib/template/node/part.rb
code-ruby-0.5.5 lib/template/node/part.rb
template-ruby-0.5.4 lib/template/node/part.rb
language-ruby-0.5.4 lib/template/node/part.rb
code-ruby-0.5.4 lib/template/node/part.rb
template-ruby-0.5.3 lib/template/node/part.rb
language-ruby-0.5.3 lib/template/node/part.rb
code-ruby-0.5.3 lib/template/node/part.rb
template-ruby-0.5.2 lib/template/node/part.rb
language-ruby-0.5.2 lib/template/node/part.rb
code-ruby-0.5.2 lib/template/node/part.rb
language-ruby-0.5.1 lib/template/node/part.rb