Class: JSGF::Grammar
- Inherits:
-
Object
- Object
- JSGF::Grammar
- Defined in:
- lib/jsgf/grammar.rb
Instance Attribute Summary collapse
-
#character_encoding ⇒ Object
readonly
Returns the value of attribute character_encoding.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#private_rules ⇒ Object
readonly
Returns the value of attribute private_rules.
-
#public_rules ⇒ Object
readonly
Returns the value of attribute public_rules.
- #rules ⇒ Object
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(character_encoding: nil, locale: nil, private_rules: {}, public_rules: {}, version: nil) ⇒ Grammar
constructor
A new instance of Grammar.
Constructor Details
#initialize(character_encoding: nil, locale: nil, private_rules: {}, public_rules: {}, version: nil) ⇒ Grammar
Returns a new instance of Grammar.
9 10 11 12 13 14 15 |
# File 'lib/jsgf/grammar.rb', line 9 def initialize(character_encoding:nil, locale:nil, private_rules:{}, public_rules:{}, version:nil) @character_encoding = character_encoding @locale = locale @private_rules = private_rules @public_rules = public_rules @version = version end |
Instance Attribute Details
#character_encoding ⇒ Object (readonly)
Returns the value of attribute character_encoding.
3 4 5 |
# File 'lib/jsgf/grammar.rb', line 3 def character_encoding @character_encoding end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
4 5 6 |
# File 'lib/jsgf/grammar.rb', line 4 def locale @locale end |
#private_rules ⇒ Object (readonly)
Returns the value of attribute private_rules.
5 6 7 |
# File 'lib/jsgf/grammar.rb', line 5 def private_rules @private_rules end |
#public_rules ⇒ Object (readonly)
Returns the value of attribute public_rules.
6 7 8 |
# File 'lib/jsgf/grammar.rb', line 6 def public_rules @public_rules end |
#rules ⇒ Object
19 20 21 |
# File 'lib/jsgf/grammar.rb', line 19 def rules @public_rules.merge(@private_rules) end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/jsgf/grammar.rb', line 7 def version @version end |