Class: WFlow::Data
- Inherits:
-
Object
- Object
- WFlow::Data
- Defined in:
- lib/w_flow/data.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(data) ⇒ Data
Returns a new instance of Data.
4 5 6 |
# File 'lib/w_flow/data.rb', line 4 def initialize(data) @data = data end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object (protected)
10 11 12 13 14 15 16 17 18 |
# File 'lib/w_flow/data.rb', line 10 def method_missing(method_name, *args, &block) method_name = method_name.to_s if method_name[-1] == '=' @data[method_name[0..-2].to_sym] = args[0] else @data[method_name.to_sym] end end |