class Angus::SDoc::Definitions::RequestElement

Attributes

constraints[RW]

@!attribute [rw] constraints

@return [Array<String>] the constraints of the request element.
description[RW]

@!attribute [rw] description

@return [String] the description of the request element.
elements_type[RW]

@!attribute [rw] elements_type

@return [String] the elements type of the request element.
name[RW]

@!attribute [rw] name

@return [String] the name of the request element.
required[RW]

@!attribute [rw] required

@return [Boolean] indicates if the request element is required or not.
type[RW]

@!attribute [rw] type

@return [String] the type of the request element.
valid_values[RW]

@!attribute [rw] valid_values

@return [Array<String>] the valid values of the request element.

Public Class Methods

new(name = nil, description = nil, required = nil, type = nil, constraints = nil, valid_values = nil, elements_type = nil) click to toggle source
# File lib/angus/definitions/request_element.rb, line 34
def initialize(name = nil, description = nil, required = nil, type = nil,
               constraints = nil, valid_values = nil, elements_type = nil)
  self.name= name if name
  self.description= description if description
  self.required= required if required
  self.type= type if type
  self.constraints= constraints if constraints
  self.valid_values= valid_values if valid_values
  self.elements_type= elements_type if elements_type
end

Public Instance Methods

==(other) click to toggle source

Check if an object is equals to the current instance.

@param [RequestElement] other The object to be compared.

@return [Boolean] true if all the attributes are equal and false otherwise.

# File lib/angus/definitions/request_element.rb, line 50
def == (other)
  other.instance_of?(Definitions::RequestElement) &&
    self.name == other.name && self.description == other.description &&
    self.required == other.required && self.type == other.type &&
    self.constraints == other.constraints &&
    self.valid_values == other.valid_values &&
    self.elements_type == other.elements_type
end