Class: Useless::Doc::Core::API

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

Overview

Documentation for an entire API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ API

Returns a new instance of API.

Parameters:

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

    corresponds to the class’s instance attributes.



38
39
40
41
42
43
44
45
46
47
# File 'lib/useless/doc/core/api.rb', line 38

def initialize(attrs = {})
  @name = attrs[:name]
  @url = attrs[:url]
  @description = attrs[:description]
  @timestamp = attrs[:timestamp]
  @resources = attrs[:resources] || []
  @concept = attrs[:concept]
  @specification = attrs[:specification]
  @implementation = attrs[:implementation]
end

Instance Attribute Details

#conceptStage

Returns a ‘Core::Stage` instance for the API concept.

Returns:

  • (Stage)

    a ‘Core::Stage` instance for the API concept.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#descriptionString

Returns a description of the API.

Returns:

  • (String)

    a description of the API.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#implementationStage

Returns a ‘Core::Stage` instance for the API implementation.

Returns:

  • (Stage)

    a ‘Core::Stage` instance for the API implementation.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#nameString

Returns nameof the API.

Returns:

  • (String)

    nameof the API.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#resourcesArray<Resource>

Returns the resources included in the API.

Returns:

  • (Array<Resource>)

    the resources included in the API.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#specificationStage

Returns a ‘Core::Stage` instance for the API specification.

Returns:

  • (Stage)

    a ‘Core::Stage` instance for the API specification.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#timestampTime

Returns the time that this API doc was last updated.

Returns:

  • (Time)

    the time that this API doc was last updated.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end

#urlString

Returns a the URL of the API.

Returns:

  • (String)

    a the URL of the API.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/useless/doc/core/api.rb', line 31

class API

  attr_accessor :name, :url, :description, :timestamp, :resources,
    :concept, :specification, :implementation

  # @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]
    @resources = attrs[:resources] || []
    @concept = attrs[:concept]
    @specification = attrs[:specification]
    @implementation = attrs[:implementation]
  end
end