aloh 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/aloh +4 -0
  3. data/lib/aloh.rb +15 -3
  4. data/lib/aloh/translator.rb +14 -0
  5. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72210ada4efc7111c9100a4654c7e13a5136a84e
4
- data.tar.gz: 6f37b301ced9faf18a59d0cfcc241a8fa8cab556
3
+ metadata.gz: 812042247f8606b7752cba5f9176f591d4bf9abb
4
+ data.tar.gz: af157f8aee2cba0d750971a921f4ca7615de62f5
5
5
  SHA512:
6
- metadata.gz: fa046c35ba3a3ddcb91c5ecfd6ee2be4c0dbce60f5b5ac1bc6898b651cdd4fe7a12a6084ce722db3c3f5d992ec9bd1846b61e057c99ac9ccb55199df786b80b9
7
- data.tar.gz: 9792c2be5bf688bf21f2acb1e622667d8f26c5db85e9cd1c82e71968a01bf1fa268e09c8d9e4e627f837131a48d222a784a2a52aa39429753255b6d168311ae4
6
+ metadata.gz: 9f1d5ac8a1e38e8ec64297ac9699050da1afad8af4958aeb663072f5fa76eee9bc8158154ebf8c9765a115930e47e047e78dc4f6f66967b529c9515fa0b95d64
7
+ data.tar.gz: d31ef1f4d5c93cf378d31c0b9c05b9fdc25db69dff4c05a13c773baafbf9f47bf744560c072cbaa9dcbf28303998198db40b6697718f18bb3b5e37a3e05a04c2
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'aloh'
4
+ puts Aloh.hi(ARGV[0])
@@ -1,5 +1,17 @@
1
- class Hola
2
- def self.hi
3
- puts "Hello world!"
1
+ class Aloh
2
+ # Say hi to the world!
3
+ #
4
+ # Example:
5
+ # >> Aloh.hi("spanish")
6
+ # => aloh mundo
7
+ #
8
+ # Arguments:
9
+ # language: (String)
10
+
11
+ def self.hi(language = "english")
12
+ translator = Translator.new(language)
13
+ translator.hi
4
14
  end
5
15
  end
16
+
17
+ require 'aloh/translator'
@@ -0,0 +1,14 @@
1
+ class Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "aloh mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aloh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronald Petty
@@ -12,11 +12,14 @@ date: 2015-01-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: ronald.petty@gmail.com
15
- executables: []
15
+ executables:
16
+ - aloh
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - lib/aloh.rb
21
+ - lib/aloh/translator.rb
22
+ - bin/aloh
20
23
  homepage: http://rubygems.org/gems/aloh
21
24
  licenses:
22
25
  - MIT