# Help using facets?

**URL:** <https://www.ruby-forum.com/t/help-using-facets/64809>\
**Category:** Ruby\
**Created:** [February 8, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/help-using-facets/64809 "2006-02-08T23:36:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 8, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/help-using-facets/64809/1 "2006-02-08T23:36:48Z")

</div>

i just discovered facets and would like to begin using them, but am  
having issues:

require ‘facets’ works, but i am unable to use anything suggested in the  
rdoc or the little stuff i’ve found online.

based on  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/163215](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/163215), i  
should be able to do

Time.use Facets, :stamp

or

Array.use Facets, :each\_permutation

but both give errors:

tinker% !.  
./facets.rb  
./facets.rb:5: uninitialized constant Facets (NameError)  
from ./facets.rb:3  
tinker% cat facets.rb  
#!/usr/local/bin/ruby

require ‘facets’

Time.use Facets, :stamp  
tinker%

i do have the gems installed:

tinker% gem list | grep facets  
facets (1.0.2)  
facets\_core (1.0.2)  
facets\_more (1.0.2)

same thing if i try the Array line. sooo…what gives? i’d really like to  
be able to use its Crypt module.

thanks

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 9, 2006, 1:52am UTC](https://www.ruby-forum.com/t/help-using-facets/64809/2 "2006-02-09T01:52:15Z")

</div>

DÅ?a Streda 08 FebruÃ¡r 2006 23:36 a non y mouse napÃ­sal:

> Time.use Facets, :stamp  
> from ./facets.rb:3  
> tinker% gem list | grep facets  
> facets (1.0.2)  
> facets\_core (1.0.2)  
> facets\_more (1.0.2)
> 
> same thing if i try the Array line. sooo…what gives? i’d really like to  
> be able to use its Crypt module.
> 
> thanks

Couldn’t reproduce this with whatever ruby there is in the Ubuntu  
repositories, latest rubygems, and whatever “gem in -y facets” gets me.

The Facets module does indeed seem to exist, however, my hopes shatter  
right  
after that. Time doesn’t have a #use class method, in fact, there is no  
such  
method in the API documentation.

The deprecated method in the documentation doesn’t help any either.

How -do- you use this library then?

The website is also in slight need of spellchecking, I wonder if this  
would be  
proper to report via the project bug tracker.

David V.

PS: Am I the only one slightly irritated by the recent surge of posts from faked e-mail addresses, and even anonymous ones?

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 9, 2006, 2:00am UTC](https://www.ruby-forum.com/t/help-using-facets/64809/3 "2006-02-09T02:00:04Z")

</div>

David V. wrote:

> PS: Am I the only one slightly irritated by the recent surge of posts from faked e-mail addresses, and even anonymous ones?

i’m not anonymous 🙂

i’ll send the maintainer an e-mail asking him what’s up. thanks!

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 9, 2006, 2:51pm UTC](https://www.ruby-forum.com/t/help-using-facets/64809/4 "2006-02-09T14:51:55Z")

</div>

DÅ?a Å tvrtok 09 FebruÃ¡r 2006 04:23 Trans napÃ­sal:

> Be sure RUBYOPT="-rubygems" then
> 
> require ‘facet/time/stamp’
> 
> > i’d really like to be able to use its Crypt module.
> 
> require ‘facet/crypt’
> 
> T.

Gah. #stamp is an instance method? Ah well, I thought it was a class  
method  
because it would look good in code that way. I should hint the Facets  
developers towards that.

So the usage in the announcement from a few months ago didn’t describe  
changs  
that were released yet?

David V.

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 9, 2006, 4:23am UTC](https://www.ruby-forum.com/t/help-using-facets/64809/5 "2006-02-09T04:23:34Z")

</div>

Be sure RUBYOPT="-rubygems" then

require ‘facet/time/stamp’

> i’d really like to be able to use its Crypt module.

require ‘facet/crypt’

T.

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 10, 2006, 6:33am UTC](https://www.ruby-forum.com/t/help-using-facets/64809/6 "2006-02-10T06:33:35Z")

</div>

Is this what you want?

def Time.stamp(\*args)  
now.stamp(\*args)  
end

I will add to next version of Facets if so.

T.

---

<div class="post-metadata">

**Author:** ![a\_non\_y\_mouse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@a\_non\_y\_mouse](https://www.ruby-forum.com/u/a_non_y_mouse)\
**Post date:** [February 10, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/help-using-facets/64809/7 "2006-02-10T14:15:13Z")

</div>

DÅ?a Piatok 10 FebruÃ¡r 2006 06:33 Trans napÃ­sal:

> Is this what you want?
> 
> def Time.stamp(\*args)  
> now.stamp(\*args)  
> end
> 
> I will add to next version of Facets if so.
> 
> T.

Yep, something like that. I have no idea how often people need textual  
timestamps of the current date though, so it might not be a particularly  
useful addition. It’s just the first usage that came to mind when I saw  
someone asking about that functionality.

David V.
