Class: FeedBooks::FBobject
- Inherits:
-
Object
- Object
- FeedBooks::FBobject
- Defined in:
- lib/ruby-feedbooks.rb
Overview
Parent class for all API objects
Constant Summary collapse
- @@connection =
Connection.new
Class Method Summary collapse
-
.connection ⇒ Object
connection getter should be a Connection.
-
.connection=(con) ⇒ Object
connection setter.
-
.from_xml(txt) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#connection ⇒ Object
connection getter.
-
#connection=(con) ⇒ Object
connection setter.
Class Method Details
.connection ⇒ Object
connection getter should be a Connection
99 100 101 |
# File 'lib/ruby-feedbooks.rb', line 99 def self.connection @@connection end |
.connection=(con) ⇒ Object
connection setter
92 93 94 95 |
# File 'lib/ruby-feedbooks.rb', line 92 def self.connection=(con) @@connection=con @@connection=Connection.new if @@connection.nil? end |
.from_xml(txt) ⇒ Object
:nodoc:
114 115 116 117 118 |
# File 'lib/ruby-feedbooks.rb', line 114 def self.from_xml(txt) #:nodoc: doc=Hpricot.XML(txt) book=doc/"/*" return from_xml_elm(book) end |
Instance Method Details
#connection ⇒ Object
connection getter
110 111 112 |
# File 'lib/ruby-feedbooks.rb', line 110 def connection @@connection end |
#connection=(con) ⇒ Object
connection setter
104 105 106 107 |
# File 'lib/ruby-feedbooks.rb', line 104 def connection=(con) @@connection=con @@connection=Connection.new if @@connection.nil? end |