Last active
November 12, 2015 12:49
-
-
Save fitomad/e3ac68279f7cce0d0651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# El que da los nombre | |
# | |
class Oraculo | |
# Nombre del proyecto | |
attr_reader :name | |
# Dominio del sitio web | |
attr_reader :domain | |
# Constructor | |
def initialize(type) | |
@type = type | |
# Damos nombre al proyecto | |
project_name | |
end | |
# | |
# Metodo privados | |
# | |
private | |
# Da un nombre al proyecto segun su tipo | |
def project_name | |
case | |
when @type == 'iOS' | |
@name = "getit" | |
@domain = "app" | |
when @type == 'OSX' | |
@name = "macapp" | |
@domain = "com" | |
when @type == 'WatchOS' | |
@name = "glance" | |
@domain = "io" | |
when @type == 'tvOS' | |
@name = "movieinfoapp" | |
@domain = "info" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment