SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Class 3 Strings and Symbols
Strings “I am a string!”
Quoting Strings Double quotes interpolate  >> me = "double quotes are awesome” >> "I am a string withdouble quotes. #{me}" => "I am a string with double quotes. double quotes are awesome" Single quotes don’t interpolate >> 'I am a string withsingle quotes. #{me}' => "I am a string withssingle quotes.n {me}"
Concatenating Strings first_name = "Yukihiro” last_name = "Matsumoto” full_name = first_name + " " + last_name => "Yukihiro Matsumoto" full_name = first_name << " " << last_name => "Yukihiro Matsumoto"
String Interpolation birthday = “January 5th” “My birthday is #{birthday}”
String Formatting: upcase >> full_name.upcase => "YUKIHIRO MATSUMOTO” >> full_name => "Yukihiro Matsumoto" >> full_name.upcase! => "YUKIHIRO MATSUMOTO" >> full_name => "YUKIHIRO MATSUMOTO"
More String Formatting >> full_name.downcase! => "yukihiro matsumoto" >> full_name.capitalize => "Yukihiro matsumoto" Making our own title case method: >> full_name.split.map {|w| w.capitalize}.join(" ") => "Yukihiro Matsumoto" We can also get title case using regex
Access a String’s Characters >> full_name[2,4] => "kihi" >> full_name[4..6] => "hir"
Ruby 1.8 >> name = "Yukihiro” => "Yukihiro” >> name[4] => 104 >> name[4].chr => "h" >> name = "こんいちわ” =>"43012343022343010443014143021” >> name[2] => 147
Ruby 1.9 >> name = "yukihiro” => "yukihiro” >> name[4] => "h” >> name = "こんいちわ” => "こんいちわ” >> name[2] => "い” >> name[0] => "こ"
Modifying a String >> full_name.slice!("hi") => "hi" >> full_name => "yukiro matsumoto" >> full_name["hi"] = "bye" => "bye" >> full_name => "Yukibyero Matsumoto" >> full_name[4,2] = "bye" => "bye" >> full_name => "Yukibyero Matsumoto"
Query a String >> full_name.include?("hi") => true >> full_name.empty? => false >> full_name.size => 18 >> full_name.count("o") => 3
Iterate Over a String each_line: process each line in a string haiku = "575” haiku.each_line{|line| puts line} 5 7 5 ,[object Object]
each_char: process charactercareful of 1.8.x and 1.9 differences>> word = "こにちわ" => "こにちわ" >> word.each_byte do |s| puts s  end 227 129 >> word = "こにちわ" => "こにちわ" >> word.each_char do |s| puts s  end こ に ち わ
Iterate Using Split returns an array of partial strings exploded at a separator secret_code = "the black dove flies at night” secret_code.split(" ").each do |s|  	puts s.reverse end eht kcalb evod seilf ta thgin
Symbols :i_am_a_symbol
What is a Symbol? A symbol represents a name. Instances of the built-in class Symbol. They efficiently describe names while saving the space one would use to generate a string for each naming instance.
A Symbol is not a String 	:thing != “thing” However a symbol can be create from a string: “thing”.to_sym And a string can be created from a symbol :thing.to_s
Symbols are Immutable You can’t change a symbol For example, you can’t append characters to a symbol...once a symbol exists, that’s it! >> :name + :me NoMethodError: undefined method `+' for :name:Symbol 	from (irb):182 	from :0 >> :name << :me NoMethodError: undefined method `<<' for :name:Symbol 	from (irb):183 	from :0
Symbols are Unique :name is the only symbol object called :name >> :name.object_id => 68828 >> :name.object_id => 68828 “name” is a new String object each time it is instantiated >> "name".object_id => 2157595700 >> "name".object_id => 2157591380

Weitere ähnliche Inhalte

Ähnlich wie 3 Strings Symbols

Ruby Strings & Symbols
Ruby Strings & SymbolsRuby Strings & Symbols
Ruby Strings & SymbolsSarah Allen
 
CGI With Object Oriented Perl
CGI With Object Oriented PerlCGI With Object Oriented Perl
CGI With Object Oriented PerlBunty Ray
 
4 Regex Enumerables
4 Regex Enumerables4 Regex Enumerables
4 Regex Enumerablesliahhansen
 
PERL Unit 6 regular expression
PERL Unit 6 regular expressionPERL Unit 6 regular expression
PERL Unit 6 regular expressionBinsent Ribera
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Languagezone
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoobirbal
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming LanguageRaghavan Mohan
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de JavascriptBernard Loire
 
Falcon初印象
Falcon初印象Falcon初印象
Falcon初印象勇浩 赖
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners PerlDave Cross
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaMarko Gargenta
 

Ähnlich wie 3 Strings Symbols (20)

Ruby Strings & Symbols
Ruby Strings & SymbolsRuby Strings & Symbols
Ruby Strings & Symbols
 
CGI With Object Oriented Perl
CGI With Object Oriented PerlCGI With Object Oriented Perl
CGI With Object Oriented Perl
 
4 Regex Enumerables
4 Regex Enumerables4 Regex Enumerables
4 Regex Enumerables
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 
Learning Ruby
Learning RubyLearning Ruby
Learning Ruby
 
PERL Unit 6 regular expression
PERL Unit 6 regular expressionPERL Unit 6 regular expression
PERL Unit 6 regular expression
 
Javascript
JavascriptJavascript
Javascript
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Language
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoo
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
Javascript
JavascriptJavascript
Javascript
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de Javascript
 
Prototype js
Prototype jsPrototype js
Prototype js
 
Strings v.1.1
Strings v.1.1Strings v.1.1
Strings v.1.1
 
Falcon初印象
Falcon初印象Falcon初印象
Falcon初印象
 
Cleancode
CleancodeCleancode
Cleancode
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners Perl
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, Marakana
 
Php 2
Php 2Php 2
Php 2
 

Kürzlich hochgeladen

Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxWorld Wide Tickets And Hospitality
 
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...gurkirankumar98700
 
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxAlbania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxWorld Wide Tickets And Hospitality
 
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfTAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfSocial Samosa
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceanilsa9823
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024Brian Slack
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Paymentanilsa9823
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Marina Costa
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...World Wide Tickets And Hospitality
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In GhazipurGenuineGirls
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺anilsa9823
 
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...Eticketing.co
 
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣anilsa9823
 
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改atducpo
 
08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
 
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...
Jankipuram / Call Girls Lucknow | Whatsapp No 🫗 8923113531 🎳 VIP Escorts Serv...
 
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxAlbania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
 
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfTAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
 
Call Girls 🫤 Paharganj ➡️ 9999965857 ➡️ Delhi 🫦 Russian Escorts FULL ENJOY
Call Girls 🫤 Paharganj ➡️ 9999965857  ➡️ Delhi 🫦  Russian Escorts FULL ENJOYCall Girls 🫤 Paharganj ➡️ 9999965857  ➡️ Delhi 🫦  Russian Escorts FULL ENJOY
Call Girls 🫤 Paharganj ➡️ 9999965857 ➡️ Delhi 🫦 Russian Escorts FULL ENJOY
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
 
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Anna Nagar Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Vasundhara 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vasundhara 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Vasundhara 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vasundhara 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...
Italy vs Albania Tickets: Italy's Quest for Euro Cup Germany History, Defendi...
 
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
 
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改
大学学位办理《原版美国USD学位证书》圣地亚哥大学毕业证制作成绩单修改
 
Call Girls 🫤 Malviya Nagar ➡️ 9999965857 ➡️ Delhi 🫦 Russian Escorts FULL ENJOY
Call Girls 🫤 Malviya Nagar ➡️ 9999965857  ➡️ Delhi 🫦  Russian Escorts FULL ENJOYCall Girls 🫤 Malviya Nagar ➡️ 9999965857  ➡️ Delhi 🫦  Russian Escorts FULL ENJOY
Call Girls 🫤 Malviya Nagar ➡️ 9999965857 ➡️ Delhi 🫦 Russian Escorts FULL ENJOY
 
08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men
 

3 Strings Symbols

  • 1. Class 3 Strings and Symbols
  • 2. Strings “I am a string!”
  • 3. Quoting Strings Double quotes interpolate >> me = "double quotes are awesome” >> "I am a string withdouble quotes. #{me}" => "I am a string with double quotes. double quotes are awesome" Single quotes don’t interpolate >> 'I am a string withsingle quotes. #{me}' => "I am a string withssingle quotes.n {me}"
  • 4. Concatenating Strings first_name = "Yukihiro” last_name = "Matsumoto” full_name = first_name + " " + last_name => "Yukihiro Matsumoto" full_name = first_name << " " << last_name => "Yukihiro Matsumoto"
  • 5. String Interpolation birthday = “January 5th” “My birthday is #{birthday}”
  • 6. String Formatting: upcase >> full_name.upcase => "YUKIHIRO MATSUMOTO” >> full_name => "Yukihiro Matsumoto" >> full_name.upcase! => "YUKIHIRO MATSUMOTO" >> full_name => "YUKIHIRO MATSUMOTO"
  • 7. More String Formatting >> full_name.downcase! => "yukihiro matsumoto" >> full_name.capitalize => "Yukihiro matsumoto" Making our own title case method: >> full_name.split.map {|w| w.capitalize}.join(" ") => "Yukihiro Matsumoto" We can also get title case using regex
  • 8. Access a String’s Characters >> full_name[2,4] => "kihi" >> full_name[4..6] => "hir"
  • 9. Ruby 1.8 >> name = "Yukihiro” => "Yukihiro” >> name[4] => 104 >> name[4].chr => "h" >> name = "こんいちわ” =>"43012343022343010443014143021” >> name[2] => 147
  • 10. Ruby 1.9 >> name = "yukihiro” => "yukihiro” >> name[4] => "h” >> name = "こんいちわ” => "こんいちわ” >> name[2] => "い” >> name[0] => "こ"
  • 11. Modifying a String >> full_name.slice!("hi") => "hi" >> full_name => "yukiro matsumoto" >> full_name["hi"] = "bye" => "bye" >> full_name => "Yukibyero Matsumoto" >> full_name[4,2] = "bye" => "bye" >> full_name => "Yukibyero Matsumoto"
  • 12. Query a String >> full_name.include?("hi") => true >> full_name.empty? => false >> full_name.size => 18 >> full_name.count("o") => 3
  • 13.
  • 14. each_char: process charactercareful of 1.8.x and 1.9 differences>> word = "こにちわ" => "こにちわ" >> word.each_byte do |s| puts s end 227 129 >> word = "こにちわ" => "こにちわ" >> word.each_char do |s| puts s end こ に ち わ
  • 15. Iterate Using Split returns an array of partial strings exploded at a separator secret_code = "the black dove flies at night” secret_code.split(" ").each do |s| puts s.reverse end eht kcalb evod seilf ta thgin
  • 17. What is a Symbol? A symbol represents a name. Instances of the built-in class Symbol. They efficiently describe names while saving the space one would use to generate a string for each naming instance.
  • 18. A Symbol is not a String :thing != “thing” However a symbol can be create from a string: “thing”.to_sym And a string can be created from a symbol :thing.to_s
  • 19. Symbols are Immutable You can’t change a symbol For example, you can’t append characters to a symbol...once a symbol exists, that’s it! >> :name + :me NoMethodError: undefined method `+' for :name:Symbol from (irb):182 from :0 >> :name << :me NoMethodError: undefined method `<<' for :name:Symbol from (irb):183 from :0
  • 20. Symbols are Unique :name is the only symbol object called :name >> :name.object_id => 68828 >> :name.object_id => 68828 “name” is a new String object each time it is instantiated >> "name".object_id => 2157595700 >> "name".object_id => 2157591380
  • 21. Homework Chapters: 8.1 & 8.2 11.1 – 11.8 Koans: about_strings Test-first-teaching piglatin

Hinweis der Redaktion

  1. There is no title case method in ruby...we can make our own