Class: R2mp3::Inspector

Inherits:
Object
  • Object
show all
Defined in:
lib/r2mp3/inspector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Inspector

Returns a new instance of Inspector.



6
7
8
9
10
11
# File 'lib/r2mp3/inspector.rb', line 6

def initialize(options={})
  @file = options[:file]
  raise InspectorError::InputFileRequired if @file.nil?
  @type = file_extension
  info
end

Instance Attribute Details

#bitrateObject (readonly)

Returns the value of attribute bitrate.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def bitrate
  @bitrate
end

#channel_modeObject (readonly)

Returns the value of attribute channel_mode.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def channel_mode
  @channel_mode
end

#filenameObject (readonly)

Returns the value of attribute filename.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def filename
  @filename
end

#headerObject (readonly)

Returns the value of attribute header.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def header
  @header
end

#layerObject (readonly)

Returns the value of attribute layer.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def layer
  @layer
end

#lengthObject (readonly)

Returns the value of attribute length.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def length
  @length
end

#mpeg_versionObject (readonly)

Returns the value of attribute mpeg_version.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def mpeg_version
  @mpeg_version
end

#samplerateObject (readonly)

Returns the value of attribute samplerate.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def samplerate
  @samplerate
end

#tagObject (readonly)

Returns the value of attribute tag.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def tag
  @tag
end

#tag1Object (readonly)

Returns the value of attribute tag1.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def tag1
  @tag1
end

#tag1_parsedObject (readonly)

Returns the value of attribute tag1_parsed.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def tag1_parsed
  @tag1_parsed
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def type
  @type
end

#vbrObject (readonly)

Returns the value of attribute vbr.



4
5
6
# File 'lib/r2mp3/inspector.rb', line 4

def vbr
  @vbr
end