Class: BlkID::Dev

Inherits:
Object
  • Object
show all
Defined in:
lib/rblkid/dev.rb

Instance Method Summary collapse

Constructor Details

#initialize(struct) ⇒ Dev

Returns a new instance of Dev.



25
26
27
# File 'lib/rblkid/dev.rb', line 25

def initialize (struct)
  @struct = struct
end

Instance Method Details

#devnameObject



29
30
31
# File 'lib/rblkid/dev.rb', line 29

def devname
  BlkID::C.blkid_dev_devname(@struct)
end

#tag?(type, value) ⇒ Boolean Also known as: has_tag?

Returns:

  • (Boolean)


33
34
35
# File 'lib/rblkid/dev.rb', line 33

def tag? (type, value)
  BlkID::C.blkid_dev_has_tag(@struct, type, value)
end

#tagsObject



38
39
40
# File 'lib/rblkid/dev.rb', line 38

def tags
  TagIterate.new(self)
end

#to_ffiObject



42
43
44
# File 'lib/rblkid/dev.rb', line 42

def to_ffi
  @struct
end