Class: Integer
- Inherits:
-
Object
show all
- Defined in:
- lib/string_builder/core.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &_block) ⇒ Object
70
71
72
73
74
|
# File 'lib/string_builder/core.rb', line 70
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
76
77
78
|
# File 'lib/string_builder/core.rb', line 76
def respond_to_missing?(name, include_private = false)
name.to_s.match?(/\A[a-z_][a-z0-9_]*\z/) || super
end
|
#to_str ⇒ Object
80
81
82
|
# File 'lib/string_builder/core.rb', line 80
def to_str
to_s
end
|