Class: SafeMe::SafeLoader::Methods
- Inherits:
-
Object
- Object
- SafeMe::SafeLoader::Methods
- Defined in:
- lib/safe-me/safe_loader.rb
Instance Method Summary collapse
- #for_method(name, &block) ⇒ Object
-
#initialize(klass) ⇒ Methods
constructor
A new instance of Methods.
Constructor Details
#initialize(klass) ⇒ Methods
Returns a new instance of Methods.
11 12 13 |
# File 'lib/safe-me/safe_loader.rb', line 11 def initialize klass @klass = klass end |
Instance Method Details
#for_method(name, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/safe-me/safe_loader.rb', line 15 def for_method name, &block @klass.class_eval do safe_method(name, TypeSafer.new(&block)) end end |