Class: QuestionproRails::Choice
- Inherits:
-
Object
- Object
- QuestionproRails::Choice
- Defined in:
- lib/questionpro_rails/choice.rb
Instance Attribute Summary collapse
-
#exclude_randomize ⇒ Object
readonly
Returns the value of attribute exclude_randomize.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_default ⇒ Object
readonly
Returns the value of attribute is_default.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Choice
constructor
A new instance of Choice.
Constructor Details
#initialize(attributes) ⇒ Choice
Returns a new instance of Choice.
6 7 8 9 10 11 12 |
# File 'lib/questionpro_rails/choice.rb', line 6 def initialize (attributes) @id = attributes['id'] @score = attributes['score'] @is_default = attributes['isDefault'] @exclude_randomize = attributes['excludeRandomize'] @text = attributes['text'] end |
Instance Attribute Details
#exclude_randomize ⇒ Object (readonly)
Returns the value of attribute exclude_randomize.
4 5 6 |
# File 'lib/questionpro_rails/choice.rb', line 4 def exclude_randomize @exclude_randomize end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/questionpro_rails/choice.rb', line 4 def id @id end |
#is_default ⇒ Object (readonly)
Returns the value of attribute is_default.
4 5 6 |
# File 'lib/questionpro_rails/choice.rb', line 4 def is_default @is_default end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
4 5 6 |
# File 'lib/questionpro_rails/choice.rb', line 4 def score @score end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/questionpro_rails/choice.rb', line 4 def text @text end |