Class: HaveAPI::GoClient::ApiVersion
- Inherits:
-
Object
- Object
- HaveAPI::GoClient::ApiVersion
- Defined in:
- lib/haveapi/go_client/api_version.rb
Instance Attribute Summary collapse
- #auth_methods ⇒ Array<Authentication::Base> readonly
- #metadata_namespace ⇒ String readonly
- #resources ⇒ Array<Resource> readonly
Instance Method Summary collapse
-
#initialize(desc) ⇒ ApiVersion
constructor
A new instance of ApiVersion.
Constructor Details
#initialize(desc) ⇒ ApiVersion
Returns a new instance of ApiVersion.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/haveapi/go_client/api_version.rb', line 12 def initialize(desc) @resources = desc[:resources].map do |k, v| Resource.new(self, k, v) end.sort! @resources.each(&:resolve_associations) @auth_methods = desc[:authentication].map do |k, v| AuthenticationMethods.new(self, k, v) end @metadata_namespace = desc[:meta][:namespace] end |
Instance Attribute Details
#auth_methods ⇒ Array<Authentication::Base> (readonly)
4 5 6 |
# File 'lib/haveapi/go_client/api_version.rb', line 4 def auth_methods @auth_methods end |
#metadata_namespace ⇒ String (readonly)
7 8 9 |
# File 'lib/haveapi/go_client/api_version.rb', line 7 def @metadata_namespace end |
#resources ⇒ Array<Resource> (readonly)
10 11 12 |
# File 'lib/haveapi/go_client/api_version.rb', line 10 def resources @resources end |