Class: Rouge::RegexLexer::State
- Inherits:
-
Object
- Object
- Rouge::RegexLexer::State
- Defined in:
- lib/rouge/regex_lexer.rb
Overview
a State is a named set of rules that can be tested for or mixed in.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &defn) ⇒ State
constructor
A new instance of State.
- #load! ⇒ Object
- #rules ⇒ Object
Constructor Details
#initialize(name, &defn) ⇒ State
Returns a new instance of State.
29 30 31 32 |
# File 'lib/rouge/regex_lexer.rb', line 29 def initialize(name, &defn) @name = name @defn = defn end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
28 29 30 |
# File 'lib/rouge/regex_lexer.rb', line 28 def name @name end |