Class: CircuitPatchTools::Commands::Info::Patch

Inherits:
Patch
  • Object
show all
Defined in:
lib/circuit_patch_tools/commands/info.rb

Constant Summary

Constants inherited from Patch

Patch::CATEGORIES, Patch::COMMANDS, Patch::FIELDS, Patch::GENRES, Patch::PATTERN, Patch::POLYPHONY, Patch::SYSEX

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Patch

#initialize, #pack, unpack

Methods included from AttrLookup

#attr_lookup

Constructor Details

This class inherits a constructor from CircuitPatchTools::Patch

Instance Attribute Details

#pathObject

Returns the value of attribute path.



62
63
64
# File 'lib/circuit_patch_tools/commands/info.rb', line 62

def path
  @path
end

Class Method Details

.open(path) ⇒ Object



64
65
66
67
# File 'lib/circuit_patch_tools/commands/info.rb', line 64

def self.open(path)
  raw = File.open(path, 'rb', encoding: Encoding::ASCII_8BIT).read
  unpack(raw).tap { |p| p.path = path }
end