Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 5th, 2006, 08:11 AM
Tantalus Tantalus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 185 Tantalus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 38 m 35 sec
Reputation Power: 8
Send a message via ICQ to Tantalus Send a message via AIM to Tantalus
Packages / Modules

I was wondering if it was possible to deaclare a module / package that can exist acrossed seperate files.

For example I have a set of sprite classes that should all be a part of the same module, but each sprite class is in a different file. Is it possible to declare them as being a member to a certain ruby module without putting them inside the module definition?
__________________
--Tantapants

Reply With Quote
  #2  
Old July 5th, 2006, 08:22 AM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 1008
Yes. ruby allows this rather well, all you do is put them in the same module, despite their being in seperate files. So each file has

ruby Code:
Original - ruby Code
    module Mymodule     #whatever end


and it will automagically put them in the same module.

You must still include the files seperately though.

Reply With Quote
  #3  
Old July 5th, 2006, 11:02 AM
Tantalus Tantalus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 185 Tantalus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 38 m 35 sec
Reputation Power: 8
Send a message via ICQ to Tantalus Send a message via AIM to Tantalus
I was going to test that first... Sorry for being such a lazy nut.

Thanks though.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Packages / Modules


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway