Class: Angus::SDoc::Definitions::ResponseElement

Inherits:
Object
  • Object
show all
Defined in:
lib/angus/definitions/response_element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, description = nil, required = nil, type = nil, default = nil, elements_type = nil, optional = nil) ⇒ ResponseElement

Returns a new instance of ResponseElement.



32
33
34
35
36
37
38
39
40
41
# File 'lib/angus/definitions/response_element.rb', line 32

def initialize(name = nil, description = nil, required = nil, type = nil, default = nil,
               elements_type = nil, optional = nil)
  @name = name
  @description = description
  @required = required
  @type = type
  @default = default
  @elements_type = elements_type
  @optional = optional
end

Instance Attribute Details

#defaultString

Returns the default value of the response element.

Returns:

  • (String)

    the default value of the response element.



22
23
24
# File 'lib/angus/definitions/response_element.rb', line 22

def default
  @default
end

#descriptionString

Returns the description of the response element.

Returns:

  • (String)

    the description of the response element.



10
11
12
# File 'lib/angus/definitions/response_element.rb', line 10

def description
  @description
end

#elements_typeString

Returns the elements type of the response element.

Returns:

  • (String)

    the elements type of the response element.



26
27
28
# File 'lib/angus/definitions/response_element.rb', line 26

def elements_type
  @elements_type
end

#nameString

Returns the name of the response element.

Returns:

  • (String)

    the name of the response element.



6
7
8
# File 'lib/angus/definitions/response_element.rb', line 6

def name
  @name
end

#optionalBoolean

Returns true if the element is optional.

Returns:

  • (Boolean)

    true if the element is optional



30
31
32
# File 'lib/angus/definitions/response_element.rb', line 30

def optional
  @optional
end

#requiredBoolean

Returns indicates if the response element is required or not.

Returns:

  • (Boolean)

    indicates if the response element is required or not.



14
15
16
# File 'lib/angus/definitions/response_element.rb', line 14

def required
  @required
end

#typeString

Returns the type of the response element.

Returns:

  • (String)

    the type of the response element.



18
19
20
# File 'lib/angus/definitions/response_element.rb', line 18

def type
  @type
end