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.



28
29
30
31
32
33
34
# File 'lib/useless/doc/core/domain.rb', line 28

def initialize(attrs = {})
  @name = attrs[:name]
  @url = attrs[:url]
  @description = attrs[:description]
  @timestamp = attrs[:timestamp]
  @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.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/useless/doc/core/domain.rb', line 22

class Domain

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

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

#descriptionString

Returns a description of the domain.

Returns:

  • (String)

    a description of the domain.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/useless/doc/core/domain.rb', line 22

class Domain

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

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

#nameString

Returns a name of the domain.

Returns:

  • (String)

    a name of the domain.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/useless/doc/core/domain.rb', line 22

class Domain

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

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

#timestampTime

Returns the time that this domain doc was last updated.

Returns:

  • (Time)

    the time that this domain doc was last updated.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/useless/doc/core/domain.rb', line 22

class Domain

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

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

#urlString

Returns a the URL of the domain.

Returns:

  • (String)

    a the URL of the domain.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/useless/doc/core/domain.rb', line 22

class Domain

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

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