Class: Useless::Doc::Core::API
- Inherits:
-
Object
- Object
- Useless::Doc::Core::API
- Defined in:
- lib/useless/doc/core/api.rb
Overview
Documentation for an entire API.
Instance Attribute Summary collapse
-
#concept ⇒ Stage
A ‘Core::Stage` instance for the API concept.
-
#description ⇒ String
A description of the API.
-
#implementation ⇒ Stage
A ‘Core::Stage` instance for the API implementation.
-
#name ⇒ String
Nameof the API.
-
#resources ⇒ Array<Resource>
The resources included in the API.
-
#specification ⇒ Stage
A ‘Core::Stage` instance for the API specification.
-
#timestamp ⇒ Time
The time that this API doc was last updated.
-
#url ⇒ String
A the URL of the API.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ API
constructor
A new instance of API.
Constructor Details
#initialize(attrs = {}) ⇒ API
Returns a new instance of API.
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
#concept ⇒ Stage
Returns 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 |
#description ⇒ String
Returns 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 |
#implementation ⇒ Stage
Returns 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 |
#name ⇒ String
Returns 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 |
#resources ⇒ Array<Resource>
Returns 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 |
#specification ⇒ Stage
Returns 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 |
#timestamp ⇒ Time
Returns 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 |
#url ⇒ String
Returns 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 |