hola-example 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/bin/hola +4 -0
  3. data/lib/hola/translator.rb +14 -0
  4. data/lib/hola.rb +20 -0
  5. metadata +47 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: df414c4b64f96967fc5c3503e39ca0eea66a430c1b736ba3478a4c49af2c0c5c
4
+ data.tar.gz: 51a6242138ef9d6fe68640f391e78bcf18446c6a8b6341c4fb889a3ebd921199
5
+ SHA512:
6
+ metadata.gz: 94f16a637ddbb9b56a23d3fed73f4e4ab5b06f09b3711ec81366e41a0a4079eb63facc9a0f788ba44d5e3a165eb196b13c87df768caa4187f319df2b478c63ee
7
+ data.tar.gz: fd5fe53af2566abe9f35da2383e09746f34830ac426f7554b7b7dde92f598c7a82a8e7b17f46c2d4883a2eea5b8f286c98cf059f7e0cdd648539d8f0a06a3af1
data/bin/hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola'
4
+ puts Hola.hi(ARGV[0])
@@ -0,0 +1,14 @@
1
+ class Hola::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
data/lib/hola.rb ADDED
@@ -0,0 +1,20 @@
1
+ # The main Hola driver
2
+ class Hola
3
+ # Say hi to the world!
4
+ #
5
+ # Example:
6
+ # >> Hola.hi("spanish")
7
+ # => hola mundo
8
+ #
9
+ # Arguments:
10
+ # language: (String)
11
+
12
+ def self.hi(language = "english")
13
+ translator = Translator.new(language)
14
+ hi = translator.hi
15
+ puts hi
16
+ return hi
17
+ end
18
+ end
19
+
20
+ require 'hola/translator'
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hola-example
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nick Quaranto
8
+ - sylhare
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2021-07-12 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A simple hello world gem
15
+ email: sylhare@outlook.com
16
+ executables:
17
+ - hola
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - bin/hola
22
+ - lib/hola.rb
23
+ - lib/hola/translator.rb
24
+ homepage: https://rubygems.org/gems/hola
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubygems_version: 3.1.4
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: Hola!
47
+ test_files: []