Class: GameFaqs::Question
- Inherits:
-
Object
- Object
- GameFaqs::Question
- Defined in:
- lib/gamefaqs/question.rb
Instance Attribute Summary collapse
-
#game ⇒ Object
readonly
Returns the value of attribute game.
-
#homepage ⇒ Object
readonly
Returns the value of attribute homepage.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#replies ⇒ Object
readonly
Returns the value of attribute replies.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(game, id, options = {}) ⇒ Question
constructor
A new instance of Question.
- #params(list = :all) ⇒ Object
Constructor Details
#initialize(game, id, options = {}) ⇒ Question
Returns a new instance of Question.
5 6 7 8 9 |
# File 'lib/gamefaqs/question.rb', line 5 def initialize(game, id, ={}) @game, @id = game, id @homepage = @game.homepage.gsub(/home/, "qna") << "?id=#{@id}" @title, @status, @replies, @type = [:title], [:status], [:replies], [:type] end |
Instance Attribute Details
#game ⇒ Object (readonly)
Returns the value of attribute game.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def game @game end |
#homepage ⇒ Object (readonly)
Returns the value of attribute homepage.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def homepage @homepage end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def id @id end |
#replies ⇒ Object (readonly)
Returns the value of attribute replies.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def replies @replies end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def status @status end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/gamefaqs/question.rb', line 3 def type @type end |
Instance Method Details
#params(list = :all) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gamefaqs/question.rb', line 11 def params(list=:all) case list when :all "type=-1" end end |