Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- ext/lib/mkmf.rb
Instance Method Summary collapse
-
#quote ⇒ Object
Wraps a string in escaped quotes if it contains whitespace.
-
#tr_cpp ⇒ Object
Generates a string used as cpp macro name.
Instance Method Details
#quote ⇒ Object
Wraps a string in escaped quotes if it contains whitespace.
151 152 153 |
# File 'ext/lib/mkmf.rb', line 151 def quote /\s/ =~ self ? "\"#{self}\"" : "#{self}" end |
#tr_cpp ⇒ Object
Generates a string used as cpp macro name.
156 157 158 |
# File 'ext/lib/mkmf.rb', line 156 def tr_cpp strip.upcase.tr_s("^A-Z0-9_", "_") end |