Skip to content

Instantly share code, notes, and snippets.

@fitomad
Last active November 12, 2015 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/e3ac68279f7cce0d0651 to your computer and use it in GitHub Desktop.
Save fitomad/e3ac68279f7cce0d0651 to your computer and use it in GitHub Desktop.
#
# 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