--8nDG9sz4+YY6JuehyKt
Content-Type: multipart/alternative; boundary="=-dU7rGz2/5vUFQDpoaerj"


--
U7rGz2/5vUFQDpoaerj
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Now I need to do something similar, but probably more difficult.

class Klass

  class SubKlass1
     def initialize
     end
  end

  class SubKlass2
    def initialize
    end
  end

end

foo  SubKlass1"

bar  lass::send(foo).new **That is wrong, because method SubKlass1
doesn't exist in Klass::Class.  But I think you get my point.

On Fri, 2007-04-06 at 07:30 +0900, Jeremy McAnally wrote:

> Something like this would work:
> 
> irb(main):008:0> x  'chop!', 'chop!', 'chop!']
> ["chop!", "chop!", "chop!"]
> irb(main):009:0> y  This is a string!!!"
> "This is a string!!!"
> irb(main):010:0> x.each {|method| y.send(method)}
> ["chop!", "chop!", "chop!"]
> irb(main):011:0> y
> "This is a string"
> 
> The send method allows you to do what you're asking. :)
> 
> --Jeremy
> 
> On 4/5/07, Ken Mitchell <kmitchell / farmerswireless.com> wrote:
> >
> >  Say I wanted to run a method based on a condition like so:
> >
> >  class Klass
> >    def initialize
> >      a  1st'
> >      b  2nd'
> >      c  3rd'
> >    end
> >
> >    def a
> >        a
> >    end
> >
> >    def b
> >      b
> >    end
> >
> >    def c
> >      c
> >    end
> >  end
> >
> >  ob  lass.new
> >  ['a','b','c'].do {|x|  ob. **here I would want to get at #a and #b and #c**
> >
> >  or maybe better explained like this
> >
> >  var  a'
> >
> >  puts ob.** ???? **
> >
> >  Or if you know perl
> >  $foo  bar "baz"};
> >  $baz  bar";
> >
> >  puts $foo->{$baz};
> >
> >  ---> baz
> >
> >  Sorry to be so confusing.
> >
> >
> >
> >
> >
> >  Thanks,
> >
> >  Ken Mitchell
> >  --
> >
> >  Farmers Wireless
> >  Office: (256)638-4040 x 224
> >  Mobile: (256)899-3391
> >  Fax:    (256)638-2110
> >  kmitchell / farmerswireless.com
> >
> >
> >
> >  CONFIDENTIALITY NOTICE: This e-mail and any attachment to it may contain
> > confidential and legally privileged information. This information is
> > intended only for the recipient named above. If you are not the intended
> > recipient, take notice that any disclosure, copying, distribution or taking
> > of any action based upon this information is prohibited by law. If you have
> > received this e-mail in error, please return it to the sender and delete
> > this copy from your system. Thank you.
> >
> >
> >
> >
> 
> 



Thanks,

Ken Mitchell 
-- 

Farmers Wireless
Office: (256)638-4040 x 224
Mobile: (256)899-3391
Fax:    (256)638-2110 
kmitchell / farmerswireless.com



CONFIDENTIALITY NOTICE: This e-mail and any attachment to it may contain
confidential and legally privileged information. This information is
intended only for the recipient named above. If you are not the intended
recipient, take notice that any disclosure, copying, distribution or
taking of any action based upon this information is prohibited by law.
If you have received this e-mail in error, please return it to the
sender and delete this copy from your system. Thank you.




--
U7rGz2/5vUFQDpoaerj
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV
ontent-Type" CONTENText/html; CHARSETF-8"> <META NAMEENERATOR" CONTENTtkHTML/3.12.3"> </HEAD> <BODY> Now I need to do something similar, but probably more difficult.<BR> <BR> class Klass<BR> <BR> &nbsp; class SubKlass1<BR> &nbsp;&nbsp;&nbsp;&nbsp; def initialize<BR> &nbsp;&nbsp;&nbsp;&nbsp; end<BR> &nbsp; end<BR> <BR> &nbsp; class SubKlass2<BR> &nbsp;&nbsp;&nbsp; def initialize<BR> &nbsp;&nbsp;&nbsp; end<BR> &nbsp; end<BR> <BR> end<BR> <BR> foo quot;SubKlass1&quot;<BR> <BR> bar lass::send(foo).new **That is wrong, because method SubKlass1 doesn't exist in Klass::Class.&nbsp; But I think you get my point.<BR> <BR> On Fri, 2007-04-06 at 07:30 +0900, Jeremy McAnally wrote: <BLOCKQUOTE TYPEE> <PRE> <FONT COLOR000000">Something like this would work:</FONT> <FONT COLOR000000">irb(main):008:0&gt; x 'chop!', 'chop!', 'chop!']</FONT> <FONT COLOR000000">t; [&quot;chop!&quot;, &quot;chop!&quot;, &quot;chop!&quot;]</FONT> <FONT COLOR000000">irb(main):009:0&gt; y quot;This is a string!!!&quot;</FONT> <FONT COLOR000000">t; &quot;This is a string!!!&quot;</FONT> <FONT COLOR000000">irb(main):010:0&gt; x.each {|method| y.send(method)}</FONT> <FONT COLOR000000">t; [&quot;chop!&quot;, &quot;chop!&quot;, &quot;chop!&quot;]</FONT> <FONT COLOR000000">irb(main):011:0&gt; y</FONT> <FONT COLOR000000">t; &quot;This is a string&quot;</FONT> <FONT COLOR000000">The send method allows you to do what you're asking. :)</FONT> <FONT COLOR000000">--Jeremy</FONT> <FONT COLOR000000">On 4/5/07, Ken Mitchell &lt;<A HREFailto:kmitchell / farmerswireless.com">kmitchell / farmerswireless.com</A>&gt; wrote:</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Say I wanted to run a method based on a condition like so:</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; class Klass</FONT> <FONT COLOR000000">&gt; def initialize</FONT> <FONT COLOR000000">&gt; a 1st'</FONT> <FONT COLOR000000">&gt; b 2nd'</FONT> <FONT COLOR000000">&gt; c 3rd'</FONT> <FONT COLOR000000">&gt; end</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; def a</FONT> <FONT COLOR000000">&gt; a</FONT> <FONT COLOR000000">&gt; end</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; def b</FONT> <FONT COLOR000000">&gt; b</FONT> <FONT COLOR000000">&gt; end</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; def c</FONT> <FONT COLOR000000">&gt; c</FONT> <FONT COLOR000000">&gt; end</FONT> <FONT COLOR000000">&gt; end</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; ob lass.new</FONT> <FONT COLOR000000">&gt; ['a','b','c'].do {|x| ob. **here I would want to get at #a and #b and #c**</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; or maybe better explained like this</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; var a'</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; puts ob.** ???? **</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Or if you know perl</FONT> <FONT COLOR000000">&gt; $foo bar t; &quot;baz&quot;};</FONT> <FONT COLOR000000">&gt; $baz quot;bar&quot;;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; puts $foo-&gt;{$baz};</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; ---&gt; baz</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Sorry to be so confusing.</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Thanks,</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Ken Mitchell</FONT> <FONT COLOR000000">&gt; --</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; Farmers Wireless</FONT> <FONT COLOR000000">&gt; Office: (256)638-4040 x 224</FONT> <FONT COLOR000000">&gt; Mobile: (256)899-3391</FONT> <FONT COLOR000000">&gt; Fax: (256)638-2110</FONT> <FONT COLOR000000">&gt; <A HREFailto:kmitchell / farmerswireless.com">kmitchell / farmerswireless.com</A></FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt; CONFIDENTIALITY NOTICE: This e-mail and any attachment to it may contain</FONT> <FONT COLOR000000">&gt; confidential and legally privileged information. This information is</FONT> <FONT COLOR000000">&gt; intended only for the recipient named above. If you are not the intended</FONT> <FONT COLOR000000">&gt; recipient, take notice that any disclosure, copying, distribution or taking</FONT> <FONT COLOR000000">&gt; of any action based upon this information is prohibited by law. If you have</FONT> <FONT COLOR000000">&gt; received this e-mail in error, please return it to the sender and delete</FONT> <FONT COLOR000000">&gt; this copy from your system. Thank you.</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> <FONT COLOR000000">&gt;</FONT> </PRE> </BLOCKQUOTE> <TABLE CELLSPACING" CELLPADDING" WIDTH00%"> <TR> <TD> <BR> <BR> Thanks,<BR> <BR> Ken Mitchell <BR> -- <BR> <IMG SRC
id:1175816826.4113.46.camel@kmitchell" ALIGN ottom" BORDER"><BR> Farmers Wireless<BR> <TT>Office: (256)638-4040 x 224</TT><BR> <TT>Mobile: (256)899-3391</TT><BR> <TT>Fax:&nbsp;&nbsp;&nbsp; (256)638-2110 </TT><BR> kmitchell / farmerswireless.com<BR> <BR> <BR> <BR> <B><FONT SIZE"><FONT COLOR000080">CONFIDENTIALITY NOTICE:</FONT></FONT></B><FONT COLOR000080"><FONT SIZE"> This e-mail and any attachment to it may contain confidential and legally privileged information. This information is intended only for the recipient named above. If you are not the intended recipient, take notice that any disclosure, copying, distribution or taking of any action based upon this information is prohibited by law. If you have received this e-mail in error, please return it to the sender and delete this copy from your system. Thank you.</FONT></FONT><BR> <BR> <BR> <BR> </TD> </TR> </TABLE> </BODY> </HTML> -- U7rGz2/5vUFQDpoaerj-- --8nDG9sz4+YY6JuehyKt Content-ID: <1175816826.4113.46.camel / kmitchell> Content-Disposition: attachment; filename=FW_logo.jpg Content-Type: image/jpeg; name=FW_logo.jpg Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAA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