Method: Tins::DynamicScope#method_missing
- Defined in:
- lib/tins/dslkit.rb
#method_missing(id, *args) ⇒ Object
623 624 625 626 627 628 629 630 631 632 633 |
# File 'lib/tins/dslkit.rb', line 623 def method_missing(id, *args) self.dynamic_scope_name ||= :variables if args.empty? and scope_reverse(dynamic_scope_name) { |c| c.key?(id) and return c[id] } super elsif args.size == 1 and id.to_s =~ /(.*?)=\Z/ c = scope_top(dynamic_scope_name) or super c[$1] = args.first else super end end |