Class: VitaminedGems::VitaminExtractor
- Inherits:
-
Object
- Object
- VitaminedGems::VitaminExtractor
show all
- Defined in:
- lib/vitamined-gems.rb
Instance Method Summary
collapse
Constructor Details
#initialize(from = nil, &block) ⇒ VitaminExtractor
57
58
59
60
|
# File 'lib/vitamined-gems.rb', line 57
def initialize(from = nil, &block)
@from = from || block
= {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
71
72
73
|
# File 'lib/vitamined-gems.rb', line 71
def method_missing(symbol, *args, &block)
[symbol] = block_given? ? block : args.first
end
|
Instance Method Details
62
63
64
65
66
67
68
69
|
# File 'lib/vitamined-gems.rb', line 62
def
if @from.is_a? Proc
instance_eval(&@from)
else
instance_eval(@from)
end
end
|