Class: Memories::Annotation

Inherits:
Hash
  • Object
show all
Defined in:
lib/memories/annotation.rb

Overview

:nodoc:

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/memories/annotation.rb', line 3

def method_missing(method_name, *args, &block)
  if args.empty?
    self[method_name]
  else
    self[method_name] = args[0]
  end
end