lib/wordnik/operation.rb in wordnik-4.06.05 vs lib/wordnik/operation.rb in wordnik-4.06.06

- old
+ new

@@ -4,11 +4,12 @@ require 'active_model' include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming - attr_accessor :endpoint, :http_method, :summary, :notes, :parameters, :response, :open, :nickname, :deprecated, :category, :suggested_name + attr_accessor :endpoint, :http_method, :summary, :notes, :parameters, :response, :open, + :nickname, :deprecated, :category, :error_responses, :response_class validates_presence_of :endpoint, :http_method, :summary, :notes, :parameters, :response, :open def initialize(endpoint, attributes = {}) self.endpoint = endpoint @@ -27,10 +28,10 @@ end else self.parameters = [] end - self.nickname = self.suggested_name.underscore + self.nickname = self.nickname.underscore end # A globally unique identifier for the operation def slug [self.endpoint.resource.name, self.nickname].join("_") \ No newline at end of file