Class: QuestionproRails::Choice

Inherits:
Object
  • Object
show all
Defined in:
lib/questionpro_rails/choice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_randomizeObject (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

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/questionpro_rails/choice.rb', line 4

def id
  @id
end

#is_defaultObject (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

#scoreObject (readonly)

Returns the value of attribute score.



4
5
6
# File 'lib/questionpro_rails/choice.rb', line 4

def score
  @score
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/questionpro_rails/choice.rb', line 4

def text
  @text
end