Sha256: 6fec53896dfbc2b958ca09b8e640be535ada78e0c6f47cc4765c8df5b07a756f

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

class Class
  def annotation(name, anno_hash = {})
    name = name.to_s
    annotations[name] ||= {}
    anno_hash.each do |k,v|
      annotations[name][k] = v
    end
  end

  def annotations
    @annotations ||= {}
  end

  def static_annotation(name, anno_hash = {})
    name = name.to_s
    annotations[name] ||= {}
    anno_hash.each do |k,v|
      static_annotations[name][k] = v
    end
  end

  def static_annotations
    @static_annotations ||= {}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby2java-0.0.1 lib/compilable/annotation.rb
ruby2java-0.0.2 lib/compilable/annotation.rb