Class: Integer
- Inherits:
-
Object
show all
- Defined in:
- lib/string_builder.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &_block) ⇒ Object
88
89
90
91
92
|
# File 'lib/string_builder.rb', line 88
def method_missing(name, *args, &_block)
return super unless name.to_s.match?(/\A[a-z_][a-z0-9_]*\z/)
MethodCallToken.new(self, name, args)
end
|
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
94
95
96
|
# File 'lib/string_builder.rb', line 94
def respond_to_missing?(name, include_private = false)
name.to_s.match?(/\A[a-z_][a-z0-9_]*\z/) || super
end
|
#to_str ⇒ Object
98
99
100
|
# File 'lib/string_builder.rb', line 98
def to_str
to_s
end
|