me falta acomodar algo aun ?


2014/1/4 Francisco Javier Larios Soto <fjlsoto@gmail.com>

> sale entonces lo voy a cambiar por que a mi lo que me interesa es
> aprender. y si puede que cause confusion.
>
>
> El 4 de enero de 2014, 20:05, Johan <notifications@github.com> escribió:
>
> In greatgrandparents.rb:
>>
>> > +
>> > +class GreatGrandParent
>> > +
>> > +include Sex
>> > +
>> > +  @@relatives = {GreatGrandParents: {woman: nil,man: nil}}
>> > +
>> > +  def initialize(name = "",sex)
>> > +    @name = name.upcase
>> > +    @sex = check(sex)
>> > +    @clas = "#{self.class}s".to_sym
>> > +    @super = "#{self.class.superclass}s".to_sym
>> > +  end
>> > +
>> > +  def add
>> > +    if @clas == :GreatGrandParents
>>
>> ruby eloquent lo puedes checar y tu eres libre de usar lo que gustes,
>> pero las convenciones se hicieron para poder trabajar en equipo y no es
>> solo de ruby, el.chiste.no es que sea symbol o string eso es.lo de.menos
>> aqui el problema es que se dice que lo unico que debe iniciar con una letra
>> mayuscula son clases o constantes, tu codigo puede funcionar pero si lo
>> agarra otra.persona va a generar confucion. El 04/01/2014 19:56,
>> "Ayax50000" <notifications@github.com> escribió:
>> … <#143602c65f0ad2ca_1436025916eb9c3b_>
>>  In greatgrandparents.rb: > + > +class GreatGrandParent > + > +include
>> Sex > + > + @@relatives <https://github.com/relatives> =
>> {GreatGrandParents: {woman: nil,man: nil}} > + > + def initialize(name =
>> "",sex) > + @name <https://github.com/name> = name.upcase > + @sex<https://github.com/sex>= check(sex) > +
>> @clas <https://github.com/clas> = "#{self.class}s".to_sym > + @super<https://github.com/super>= "#{self.class.superclass}s".to_sym > + end > + > + def add > + if
>> @clas <https://github.com/clas> == :GreatGrandParents eso que esta en el
>> codigo es un simbolo, no una variable, ni una constante, el hecho de que
>> comienza con dos puntos quiere decir que es un simbolo, .entonces no puedo
>> aplicar patrones que rigen a variables o constantes a un simbolo ? de ser
>> asi me podrias decir donde puedo checar buenas practicas para simbolos, y
>> bueno ya por fin si quieres que lo cambie lo hago y ya. XD 2014/1/4 Johan <
>> notifications@github.com> … <#143601d6767e8c43_> In
>> greatgrandparents.rb: > + > +class GreatGrandParent > + > +include Sex > +
>> > + @@relatives <https://github.com/relatives> <
>> https://github.com/relatives> = {GreatGrandParents: {woman: nil,man:
>> nil}} > + > + def initialize(name = "",sex) > + @name<https://github.com/name>
>> <https://github.com/name>= name.upcase > + @sex <https://github.com/sex><
>> https://github.com/sex> = check(sex) > + @clas <https://github.com/clas><
>> https://github.com/clas>= "#{self.class}s".to_sym > + @super<https://github.com/super><
>> https://github.com/super> = "#{self.class.superclass}s".to_sym > + end >
>> + > + def add > + if @clas <https://github.com/clas> <
>> https://github.com/clas> == :GreatGrandParents ok en base a tu respuesta
>> puedo hacer esto: @Mivariable, @@Miotravariable, $Otravarible, de
>> todas.formas todas inician con @ o $ cierto? El 04/01/2014 19:15,
>> "Ayax50000" <notifications@github.com> escribió: … <#143600d1ef314661_>
>> In greatgrandparents.rb: > + > +class GreatGrandParent > + > +include Sex >
>> + > + @@relatives <https://github.com/relatives><
>> https://github.com/relatives>< https://github.com/relatives> =
>> {GreatGrandParents: {woman: nil,man: nil}} > + > + def initialize(name =
>> "",sex) > + @name <https://github.com/name><https://github.com/name> <
>> https://github.com/name>= name.upcase > + @sex <https://github.com/sex> <
>> https://github.com/sex> < https://github.com/sex> = check(sex) > + @clas<https://github.com/clas><
>> https://github.com/clas>< https://github.com/clas>="#{self.class}s".to_sym > +
>> @super <https://github.com/super><https://github.com/super><
>> https://github.com/super> = "#{self.class.superclass}s".to_sym > + end >
>> + > + def add > + if @clas <https://github.com/clas> <
>> https://github.com/clas> < https://github.com/clas> ==
>> :GreatGrandParents pero eso inicia con esto ":" — Reply to this email
>> directly or view it on GitHub<
>> https://github.com/Ayax50000/GeneticTree/pull/2/files#r8653906> . —
>> Reply to this email directly or view it on GitHub<
>> https://github.com/Ayax50000/GeneticTree/pull/2/files#r8653947> . —
>> Reply to this email directly or view it on GitHub<
>> https://github.com/Ayax50000/GeneticTree/pull/2/files#r8653973> .
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/Ayax50000/GeneticTree/pull/2/files#r8653996>
>> .
>>
>
>