Module: Sashite::Snn
- Defined in:
- lib/sashite/snn.rb,
lib/sashite/snn/name.rb
Overview
SNN (Style Name Notation) implementation for Ruby
Provides a formal naming system for identifying styles in abstract strategy board games. SNN uses canonical, human-readable ASCII names beginning with an uppercase letter. It supports unlimited unique style identifiers with consistent, rule-agnostic semantics.
Format: <uppercase-letter>[<lowercase-letter | digit>]*
Examples:
"Chess" - Standard Western chess
"Shogi" - Japanese chess
"Minishogi" - 5
Defined Under Namespace
Classes: Name
Class Method Summary collapse
-
.name(value) ⇒ Snn::Name
Create a new Name instance directly.
-
.parse(snn_string) ⇒ Snn::Name
Parse an SNN string into a Name object.
-
.valid?(snn_string) ⇒ Boolean
Check if a string is valid SNN notation.
Class Method Details
.name(value) ⇒ Snn::Name
Create a new Name instance directly
55 56 57 |
# File 'lib/sashite/snn.rb', line 55 def self.name(value) Name.new(value) end |
.parse(snn_string) ⇒ Snn::Name
Parse an SNN string into a Name object
43 44 45 |
# File 'lib/sashite/snn.rb', line 43 def self.parse(snn_string) Name.parse(snn_string) end |
.valid?(snn_string) ⇒ Boolean
Check if a string is valid SNN notation
31 32 33 |
# File 'lib/sashite/snn.rb', line 31 def self.valid?(snn_string) Name.valid?(snn_string) end |