Method: Sashite::Pin.parse

Defined in:
lib/sashite/pin.rb

.parse(pin_string) ⇒ Pin::Identifier

Parse a PIN string into an Identifier object

Examples:

Sashite::Pin.parse("K")     # => #<Pin::Identifier type=:K side=:first state=:normal>
Sashite::Pin.parse("+R")    # => #<Pin::Identifier type=:R side=:first state=:enhanced>
Sashite::Pin.parse("-p")    # => #<Pin::Identifier type=:P side=:second state=:diminished>

Parameters:

  • PIN notation string

Returns:

  • new identifier instance

Raises:

  • if the PIN string is invalid



47
48
49
# File 'lib/sashite/pin.rb', line 47

def self.parse(pin_string)
  Identifier.parse(pin_string)
end