Skip to content

Commit

Permalink
Merge branch 'N0zz-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ianheggie committed May 12, 2015
2 parents fc9a619 + 5ba5eff commit 3d92c12
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Simple “hello world” gem, with tests and code coverage

Add this line to your application's Gemfile:

gem 'hola'
gem 'hola-ianh'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hola
$ gem install hola-ianh

## Usage

Expand All @@ -31,3 +31,6 @@ See http://guides.rubygems.org/make-your-own-gem/
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Thanks

Forked with thanks to qrush from https://github.com/qrush/hola.
2 changes: 2 additions & 0 deletions lib/hola.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: UTF-8

class Hola
def self.hi(language)
translator = Translator.new(language)
Expand Down
4 changes: 4 additions & 0 deletions lib/hola/translator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: UTF-8

class Hola::Translator
def initialize(language = "english")
@language = language
Expand All @@ -11,6 +13,8 @@ def hi
"anyoung ha se yo"
when "dutch"
"hallo wereld"
when "polish"
"witaj świecie"
else
"hello world"
end
Expand Down
5 changes: 5 additions & 0 deletions test/test_hola.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# encoding: UTF-8
require 'coveralls'
Coveralls.wear!

Expand All @@ -24,4 +25,8 @@ def test_dutch_hello
def test_korean_hello
assert_equal "anyoung ha se yo", Hola.hi("korean")
end

def test_polish_hello
assert_equal "witaj świecie", Hola.hi("polish")
end
end

0 comments on commit 3d92c12

Please sign in to comment.