Class: GPhoto2::CameraFilePath

Inherits:
Object
  • Object
show all
Includes:
Struct
Defined in:
lib/gphoto2/camera_file_path.rb

Instance Attribute Summary

Attributes included from Struct

#ptr

Instance Method Summary collapse

Methods included from Struct

#to_ptr

Constructor Details

#initialize(ptr = nil) ⇒ CameraFilePath

Returns a new instance of CameraFilePath.



5
6
7
# File 'lib/gphoto2/camera_file_path.rb', line 5

def initialize(ptr = nil)
  @ptr = ptr || FFI::GPhoto2::CameraFilePath.new
end

Instance Method Details

#folderString

Returns:

  • (String)


15
16
17
# File 'lib/gphoto2/camera_file_path.rb', line 15

def folder
  ptr[:folder].to_s
end

#nameString

Returns:

  • (String)


10
11
12
# File 'lib/gphoto2/camera_file_path.rb', line 10

def name
  ptr[:name].to_s
end