# File output

**URL:** <https://www.ruby-forum.com/t/file-output/125488>\
**Category:** Ruby\
**Created:** [January 9, 2008, 4:11pm UTC](https://www.ruby-forum.com/t/file-output/125488 "2008-01-09T16:11:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fussy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/dbc845/32.png) [@fussy](https://www.ruby-forum.com/u/fussy)\
**Post date:** [January 9, 2008, 4:11pm UTC](https://www.ruby-forum.com/t/file-output/125488/1 "2008-01-09T16:11:04Z")

</div>

How can I send code to a .txt document? I mean say I have two scripts

1. Time module

2. Audio Module

Now the time module I have made a built in function a hidden class for  
another term, so it’s part of a program that lets users modify the  
programs code but not all of them, time is set depending on country from  
the start so the user sets time on first use so there is no need for the  
time module to be visible so it’s built in/hidden, but…

Lets say I forget to introduce a time zone and on the next  
release/update I have to write in the new time zone, now I have hidden  
it so even myself can’t view it  
(I haven’t actually, this is an example. I am trying to hide it but need  
to know how I would be able to view it again)

Or, is there a way I can send/save a classes or modules code to a txt  
file for later viewing without actually clicking on the classes/modules  
tab?

Hope someone understands, I don’t want to hide a script and then not be  
able to modify/view it myself.

---

<div class="post-metadata">

**Author:** ![fussy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/dbc845/32.png) [@fussy](https://www.ruby-forum.com/u/fussy)\
**Post date:** [January 9, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/file-output/125488/2 "2008-01-09T16:13:18Z")

</div>

Burt Hill wrote:

> How can I send code to a .txt document? I mean say I have two scripts
> 
> 1. Time module
> 
> 2. Audio Module
> 
> Now the time module I have made a built in function a hidden class for  
> another term, so it’s part of a program that lets users modify the  
> programs code but not all of them, time is set depending on country from  
> the start so the user sets time on first use so there is no need for the  
> time module to be visible so it’s built in/hidden, but…
> 
> Lets say I forget to introduce a time zone and on the next  
> release/update I have to write in the new time zone, now I have hidden  
> it so even myself can’t view it  
> (I haven’t actually, this is an example. I am trying to hide it but need  
> to know how I would be able to view it again)

[_related to this paragraph_]

> Or, is there a way I can send/save a classes or modules code to a txt  
> file for later viewing without actually clicking on the classes/modules  
> tab?  
> [\*]
> 
> Hope someone understands, I don’t want to hide a script and then not be  
> able to modify/view it myself.

I mean by syntax and not just copying the code to a text document.
