From: Michael Sokol Date: 2011-12-12T23:14:11+09:00 Subject: Re: How to call method of one class in another class Since classes are objects themselves, they also have methods. To define class methods, class MyClass def self.my_method p self end end MyClass.my_method Hope this helped. On Dec 12, 2011, at 2:53 PM, rubythemystery ruby wrote: > Hi all, > > Any help is appreciated. > > I have a class namely, > > class Web > include HTTParty > > headers 'Accept' => 'application/xml' > format :xml > > end > > And I have another class, > > class AtomFormats < HTTParty::Parser > include HTTParty > SupportedFormats.merge!( > { "application/atom+xml" => :atom} > ) > def atom > headers 'Accept' => 'application/atom+xml' > format :atom > end > end > > > I need to change the headers and format present in Class web to those > parameters present in Class Atomformats. > > How can I make a call from Class web to Class Atomformats to make the > change happen > > Thanks > > -- > Posted via http://www.ruby-forum.com/. >