Created
January 13, 2011 10:25
-
-
Save rjpbonnal/777672 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
# Recode a vector based on a block | |
class Pippo | |
def recode!(vector_name) | |
0.upto(@cases-1) {|i| | |
@vectors[vector_name].data[i]=yield case_as_hash(i) | |
} | |
@vectors[vector_name].set_valid_data | |
end | |
end | |
class Pluto | |
def recode!(field) | |
qui devo richiamare istanza_di_pippo.recode!(field) con un blocco di codice. | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
class Pippo
def recode!(vector_name)
end
class Pluto
def recode!(field,&b)
istanza_di_pippo.recode!(field,&b)
end
end