Class: HTML2FB::FBSession
- Inherits:
-
Object
- Object
- HTML2FB::FBSession
- Defined in:
- lib/Html2Feedbooks/feedbooks.rb
Constant Summary collapse
- @@fbsession =
nil
Instance Attribute Summary collapse
-
#bookid ⇒ Object
Returns the value of attribute bookid.
-
#booktype ⇒ Object
Returns the value of attribute booktype.
-
#host ⇒ Object
Returns the value of attribute host.
-
#pass ⇒ Object
Returns the value of attribute pass.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conf) ⇒ FBSession
constructor
A new instance of FBSession.
Constructor Details
#initialize(conf) ⇒ FBSession
Returns a new instance of FBSession.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 15 def initialize(conf) StandardError.new('Already in session') unless @@fbsession.nil? @@fbsession=self self.bookid=ask(conf['fb']['bookid'],"Book Id") self.booktype=ask(conf['fb']['booktype'],"Book Type") self.user=ask(conf['fb']['user'],"User") self.pass=ask(conf['fb']['pass'],"Pass") self.host=conf['fb']['host'] self.host='feedbooks.com' if @host.nil? end |
Instance Attribute Details
#bookid ⇒ Object
Returns the value of attribute bookid.
9 10 11 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 9 def bookid @bookid end |
#booktype ⇒ Object
Returns the value of attribute booktype.
10 11 12 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 10 def booktype @booktype end |
#host ⇒ Object
Returns the value of attribute host.
13 14 15 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 13 def host @host end |
#pass ⇒ Object
Returns the value of attribute pass.
12 13 14 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 12 def pass @pass end |
#user ⇒ Object
Returns the value of attribute user.
11 12 13 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 11 def user @user end |
Class Method Details
.session ⇒ Object
26 27 28 |
# File 'lib/Html2Feedbooks/feedbooks.rb', line 26 def self.session return @@fbsession end |