Skip to content

Commit

Permalink
Adiciona Código em Ruby para #33
Browse files Browse the repository at this point in the history
  • Loading branch information
elissonmichael committed May 22, 2018
1 parent cbd7f82 commit 1acf6e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extensao_para_string/extensao_string.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class String

def titleize
self.split(' ').collect {|word| word.capitalize}.join(' ')
end

def blank?
/\A[[:space:]]*\z/ === self
end

end

0 comments on commit 1acf6e1

Please sign in to comment.