Class: Bauxite::Context::StringProxy
- Inherits:
-
Object
- Object
- Bauxite::Context::StringProxy
- Defined in:
- lib/bauxite/core/context.rb
Overview
Same as a common String except that split(‘ ’) behaves as split(/s/).
Instance Method Summary collapse
-
#initialize(s) ⇒ StringProxy
constructor
:nodoc:.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(s) ⇒ StringProxy
:nodoc:
766 767 768 |
# File 'lib/bauxite/core/context.rb', line 766 def initialize(s) @s = s end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
770 771 772 773 |
# File 'lib/bauxite/core/context.rb', line 770 def method_missing(method, *args, &block) args[0] = /\s/ if method == :split and args.size > 0 and args[0] == ' ' ret = @s.send(method, *args, &block) end |