Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/string_envelop.rb
Instance Method Summary collapse
- #/(value) ⇒ Object
- #apostrophes ⇒ Object
- #backslashs ⇒ Object
- #braces ⇒ Object
- #brackets ⇒ Object
- #chevrons ⇒ Object
- #commas ⇒ Object
- #parentheses ⇒ Object
- #quotes ⇒ Object
- #slashs ⇒ Object
- #spaces ⇒ Object
Instance Method Details
#/(value) ⇒ Object
46 47 48 |
# File 'lib/string_envelop.rb', line 46 def /(value) return self.split(value) if value.class == String end |
#apostrophes ⇒ Object
29 30 31 |
# File 'lib/string_envelop.rb', line 29 def apostrophes "'"<< self << "'" end |
#backslashs ⇒ Object
41 42 43 |
# File 'lib/string_envelop.rb', line 41 def backslashs "\\" << self << "\\" end |
#braces ⇒ Object
17 18 19 |
# File 'lib/string_envelop.rb', line 17 def braces '{' << self << '}' end |
#brackets ⇒ Object
13 14 15 |
# File 'lib/string_envelop.rb', line 13 def brackets "[" << self << "]" end |
#chevrons ⇒ Object
5 6 7 |
# File 'lib/string_envelop.rb', line 5 def chevrons "<" << self << ">" end |
#commas ⇒ Object
33 34 35 |
# File 'lib/string_envelop.rb', line 33 def commas "," << self << "," end |
#parentheses ⇒ Object
9 10 11 |
# File 'lib/string_envelop.rb', line 9 def parentheses "(" << sefl << ")" end |
#quotes ⇒ Object
21 22 23 |
# File 'lib/string_envelop.rb', line 21 def quotes "\"" << self << "\"" end |
#slashs ⇒ Object
37 38 39 |
# File 'lib/string_envelop.rb', line 37 def slashs "/" << self << "/" end |
#spaces ⇒ Object
25 26 27 |
# File 'lib/string_envelop.rb', line 25 def spaces ' ' << self << ' ' end |