Module: GPhoto2

Defined in:
lib/gphoto2.rb,
lib/gphoto2/port.rb,
lib/gphoto2/entry.rb,
lib/gphoto2/camera.rb,
lib/gphoto2/struct.rb,
lib/gphoto2/context.rb,
lib/gphoto2/version.rb,
lib/gphoto2/port_info.rb,
lib/gphoto2/camera_file.rb,
lib/gphoto2/camera_list.rb,
lib/gphoto2/port_result.rb,
lib/gphoto2/camera/event.rb,
lib/gphoto2/camera_event.rb,
lib/gphoto2/camera_folder.rb,
lib/gphoto2/camera/capture.rb,
lib/gphoto2/port_info_list.rb,
lib/gphoto2/camera_abilities.rb,
lib/gphoto2/camera_file_path.rb,
lib/gphoto2/camera/filesystem.rb,
lib/gphoto2/camera/configuration.rb,
lib/gphoto2/camera_abilities_list.rb,
lib/gphoto2/camera_widgets/camera_widget.rb,
lib/gphoto2/camera_file_info/camera_file_info.rb,
lib/gphoto2/camera_widgets/date_camera_widget.rb,
lib/gphoto2/camera_widgets/menu_camera_widget.rb,
lib/gphoto2/camera_widgets/text_camera_widget.rb,
lib/gphoto2/camera_widgets/radio_camera_widget.rb,
lib/gphoto2/camera_widgets/range_camera_widget.rb,
lib/gphoto2/camera_widgets/toggle_camera_widget.rb,
lib/gphoto2/camera_widgets/window_camera_widget.rb,
lib/gphoto2/camera_widgets/section_camera_widget.rb,
lib/gphoto2/camera_file_info/file_camera_file_info.rb

Defined Under Namespace

Modules: Struct Classes: Camera, CameraAbilities, CameraAbilitiesList, CameraEvent, CameraFile, CameraFileInfo, CameraFilePath, CameraFolder, CameraList, CameraWidget, Context, DateCameraWidget, Entry, Error, FileCameraFileInfo, MenuCameraWidget, Port, PortInfo, PortInfoList, PortResult, RadioCameraWidget, RangeCameraWidget, SectionCameraWidget, TextCameraWidget, ToggleCameraWidget, WindowCameraWidget

Constant Summary collapse

VERSION =
'0.10.0'

Class Method Summary collapse

Class Method Details

.check!(rc) ⇒ void

This method returns an undefined value.

Parameters:

  • rc (Integer)

Raises:



70
71
72
73
74
# File 'lib/gphoto2.rb', line 70

def self.check!(rc)
  logger.debug "#{caller.first} => #{rc}" if ENV['DEBUG']
  return if rc >= FFI::GPhoto2Port::GP_OK
  raise Error.new(PortResult.as_string(rc), rc)
end

.loggerLogger

Returns:

  • (Logger)


63
64
65
# File 'lib/gphoto2.rb', line 63

def self.logger
  @logger ||= Logger.new(STDERR)
end