Sha256: 6a59f6478430d29f24c8798bce9e3e8ea428ebbac91bb7abda69c30c34b84f0b

Contents?: true

Size: 263 Bytes

Versions: 15

Compression:

Stored size: 263 Bytes

Contents

module Chicanery
  module Collections
    %w{server repo}.each do |entity|
      class_eval <<-EOF
        def #{entity} entity
          #{entity}s << entity
        end

        def #{entity}s
          @#{entity}s ||= []
        end
      EOF
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
chicanery-0.2.0 lib/chicanery/collections.rb
chicanery-0.1.9 lib/chicanery/collections.rb
chicanery-0.1.8 lib/chicanery/collections.rb
chicanery-0.1.7 lib/chicanery/collections.rb
chicanery-0.1.6 lib/chicanery/collections.rb
chicanery-0.1.5 lib/chicanery/collections.rb
chicanery-0.1.4 lib/chicanery/collections.rb
chicanery-0.1.3 lib/chicanery/collections.rb
chicanery-0.1.1 lib/chicanery/collections.rb
chicanery-0.1.0 lib/chicanery/collections.rb
chicanery-0.0.9 lib/chicanery/collections.rb
chicanery-0.0.8 lib/chicanery/collections.rb
chicanery-0.0.7 lib/chicanery/collections.rb
chicanery-0.0.6 lib/chicanery/collections.rb
chicanery-0.0.5 lib/chicanery/collections.rb