Class: SonyCameraRemoteAPI::RawAPIManager::APIInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/sony_camera_remote_api/raw_api.rb

Overview

API Information class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, versions, service_types) ⇒ APIInfo

Returns a new instance of APIInfo.



14
15
16
17
18
# File 'lib/sony_camera_remote_api/raw_api.rb', line 14

def initialize(name, versions, service_types)
  @name = name
  @versions = [versions]
  @service_types = [service_types]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/sony_camera_remote_api/raw_api.rb', line 12

def name
  @name
end

#service_typesObject

Returns the value of attribute service_types.



12
13
14
# File 'lib/sony_camera_remote_api/raw_api.rb', line 12

def service_types
  @service_types
end

#versionsObject

Returns the value of attribute versions.



12
13
14
# File 'lib/sony_camera_remote_api/raw_api.rb', line 12

def versions
  @versions
end

Instance Method Details

#multi_service_types?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/sony_camera_remote_api/raw_api.rb', line 24

def multi_service_types?
  @service_types.length > 1
end

#multi_versions?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/sony_camera_remote_api/raw_api.rb', line 20

def multi_versions?
  @versions.length > 1
end