Class: GPhoto2::CameraList

Inherits:
Object
  • Object
show all
Includes:
FFI::GPhoto2, Struct
Defined in:
lib/gphoto2/camera_list.rb

Constant Summary

Constants included from FFI::GPhoto2

FFI::GPhoto2::CameraCaptureType, FFI::GPhoto2::CameraDriverStatus, FFI::GPhoto2::CameraEventType, FFI::GPhoto2::CameraFileAccessType, FFI::GPhoto2::CameraFileInfoFields, FFI::GPhoto2::CameraFileOperation, FFI::GPhoto2::CameraFilePermissions, FFI::GPhoto2::CameraFileStatus, FFI::GPhoto2::CameraFileType, FFI::GPhoto2::CameraFolderOperation, FFI::GPhoto2::CameraOperation, FFI::GPhoto2::CameraWidgetType, FFI::GPhoto2::GphotoDeviceType

Instance Attribute Summary

Attributes included from Struct

#ptr

Instance Method Summary collapse

Methods included from Struct

#to_ptr

Constructor Details

#initializeCameraList

Returns a new instance of CameraList.



6
7
8
# File 'lib/gphoto2/camera_list.rb', line 6

def initialize
  new
end

Instance Method Details

#sizeInteger Also known as: length

Returns:

  • (Integer)


11
12
13
# File 'lib/gphoto2/camera_list.rb', line 11

def size
  count
end

#to_aArray<GPhoto2::Entry>

Returns:



17
18
19
# File 'lib/gphoto2/camera_list.rb', line 17

def to_a
  size.times.map { |i| Entry.new(self, i) }
end