Module: Anise
- Extended by:
- Anise
- Included in:
- Anise
- Defined in:
- lib/anise.rb,
lib/anise/annotator.rb,
lib/anise/attribute.rb,
lib/anise/annotation.rb
Overview
Anise
Dynamic Annotations for Ruby.
require 'anise'
class X
include Anise
# Provides annotations
ann :foo, :class=>String
# Provides annotated attributes
attr :bar, Integer, :max=>10
# Provides method annotators.
annotator :doc
doc "foo is cool"
def foo
# ...
end
end
Defined Under Namespace
Modules: Annotation, Annotator, Attribute
Constant Summary collapse
- VERSION =
becuase Ruby 1.8~ gets in the way :(
['version']
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.const_missing(name) ⇒ Object
56 57 58 |
# File 'lib/anise.rb', line 56 def self.const_missing(name) [name.to_s.downcase] || super(name) end |
.metadata ⇒ Object
48 49 50 51 52 53 |
# File 'lib/anise.rb', line 48 def self. @metadata ||= ( require 'yaml' YAML.load(File.new(File.dirname(__FILE__) + '/anise.yml')) ) end |