Class: Useless::Doc::Core::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/useless/doc/core/domain.rb

Overview

Documentation for a domain - a group of APIs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Domain

Returns a new instance of Domain.

Parameters:

  • attrs (Hash) (defaults to: {})

    corresponds to the class’s instance attributes.



25
26
27
28
29
30
# File 'lib/useless/doc/core/domain.rb', line 25

def initialize(attrs = {})
  @name = attrs[:name]
  @url = attrs[:url]
  @description = attrs[:description]
  @apis = attrs[:apis]
end

Instance Attribute Details

#apisArray<API>

Returns the APIs included in this domain.

Returns:

  • (Array<API>)

    the APIs included in this domain.



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/useless/doc/core/domain.rb', line 19

class Domain

  attr_accessor :name, :url, :description, :apis

  # @param [Hash] attrs corresponds to the class's instance attributes.
  #
  def initialize(attrs = {})
    @name = attrs[:name]
    @url = attrs[:url]
    @description = attrs[:description]
    @apis = attrs[:apis]
  end
end

#descriptionString

Returns a description of the domain.

Returns:

  • (String)

    a description of the domain.



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/useless/doc/core/domain.rb', line 19

class Domain

  attr_accessor :name, :url, :description, :apis

  # @param [Hash] attrs corresponds to the class's instance attributes.
  #
  def initialize(attrs = {})
    @name = attrs[:name]
    @url = attrs[:url]
    @description = attrs[:description]
    @apis = attrs[:apis]
  end
end

#nameString

Returns a name of the domain.

Returns:

  • (String)

    a name of the domain.



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/useless/doc/core/domain.rb', line 19

class Domain

  attr_accessor :name, :url, :description, :apis

  # @param [Hash] attrs corresponds to the class's instance attributes.
  #
  def initialize(attrs = {})
    @name = attrs[:name]
    @url = attrs[:url]
    @description = attrs[:description]
    @apis = attrs[:apis]
  end
end

#urlString

Returns a the URL of the domain.

Returns:

  • (String)

    a the URL of the domain.



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/useless/doc/core/domain.rb', line 19

class Domain

  attr_accessor :name, :url, :description, :apis

  # @param [Hash] attrs corresponds to the class's instance attributes.
  #
  def initialize(attrs = {})
    @name = attrs[:name]
    @url = attrs[:url]
    @description = attrs[:description]
    @apis = attrs[:apis]
  end
end