File: attribute.rb

package info (click to toggle)
ruby-rabl-rails 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 288 kB
  • sloc: ruby: 1,630; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module RablRails
  module Nodes
    class Attribute
      attr_reader   :hash
      attr_accessor :condition

      def initialize(hash = {})
        @hash = hash
      end

      def []=(key, value)
        @hash[key] = value
      end

      def each(&block)
        @hash.each(&block)
      end
    end
  end
end