lib/groupdocs/questionnaire/question.rb in groupdocs-1.2.11 vs lib/groupdocs/questionnaire/question.rb in groupdocs-1.3.0
- old
+ new
@@ -58,11 +58,11 @@
# @param [Symbol] type
# @raise [ArgumentError] if type is unknown
#
def type=(type)
if type.is_a?(Symbol)
- type = accessor_to_variable(type).to_s.delete(?@)
+ type = type.to_s.camelize
TYPES.include?(type) or raise ArgumentError, "Unknown type: #{type.inspect}"
end
@type = type
end
@@ -71,10 +71,10 @@
# Returns field type in human-readable format.
#
# @return [Symbol]
#
def type
- variable_to_accessor(@type)
+ @type.underscore.to_sym
end
end # Questionnaire::Question
end # GroupDocs