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