File: glue.rb

package info (click to toggle)
ruby-rabl-rails 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 268 kB
  • ctags: 179
  • sloc: ruby: 1,480; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module RablRails
  module Nodes
    class Glue
      include Node

      attr_reader :template

      def initialize(template)
        @template = template
      end

      def data
        @template.data
      end

      def nodes
        @template.nodes
      end

      def instance_variable_data?
        @instance_variable_data ||= data.to_s.start_with?('@')
      end
    end
  end
end