Module: RIO::Fwd
- Included in:
- Alt::URI::Base, Alt::URI::FieldStore, CmdIO::RRL, Cx::Vars, CxURI, Ext::Mp3Info, RIO::FS::Fwd::Dir, RIO::FS::Fwd::File, RIO::FS::Fwd::Path, RIO::FS::Fwd::Str, RIO::FS::Fwd::Test, RIO::FS::Fwd::Util, HTTP::Stream::Input, IOH::Dir, IOH::Stream, Match::Entry::List, Mode::Base, Ops::Dir::Stream, Ops::Path::URI, Ops::Stream::Manip, RRL::WithPath, State::Base, State::Data, StdIO::RRL, Stream::Duplex::Ops, Temp::Dir::RRL, Temp::File::RRL, Temp::RRL
- Defined in:
- lib/rio/fwd.rb
Instance Method Summary collapse
- #fwd(target, *methods) ⇒ Object
- #fwd_reader(target, method) ⇒ Object
- #fwd_readers(target, *methods) ⇒ Object
- #fwd_writer(target, method) ⇒ Object
- #fwd_writers(target, *methods) ⇒ Object
Instance Method Details
#fwd(target, *methods) ⇒ Object
33 34 35 36 |
# File 'lib/rio/fwd.rb', line 33 def fwd(target,*methods) fwd_readers target, *methods fwd_writers target, *methods end |
#fwd_reader(target, method) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/rio/fwd.rb', line 3 def fwd_reader(target, method) line_no = __LINE__ str = %{ def #{method}(*args, &block) #{target}.__send__(:#{method}, *args, &block) end } module_eval(str,__FILE__,line_no) end |
#fwd_readers(target, *methods) ⇒ Object
12 13 14 15 16 |
# File 'lib/rio/fwd.rb', line 12 def fwd_readers(target, *methods) methods.each do |method| fwd_reader target, method end end |
#fwd_writer(target, method) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/rio/fwd.rb', line 18 def fwd_writer(target, method) line_no = __LINE__ str = %{ def #{method}=(*args, &block) #{target}.__send__(:#{method}=, *args, &block) end } module_eval(str,__FILE__,line_no) end |
#fwd_writers(target, *methods) ⇒ Object
27 28 29 30 31 |
# File 'lib/rio/fwd.rb', line 27 def fwd_writers(target, *methods) methods.each do |method| fwd_writer target, method end end |