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.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
-
#initialize(name, rules) ⇒ State
constructor
A new instance of State.
- #inspect ⇒ Object
Constructor Details
#initialize(name, rules) ⇒ State
Returns a new instance of State.
65 66 67 68 |
# File 'lib/rouge/regex_lexer.rb', line 65 def initialize(name, rules) @name = name @rules = rules end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
64 65 66 |
# File 'lib/rouge/regex_lexer.rb', line 64 def name @name end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
64 65 66 |
# File 'lib/rouge/regex_lexer.rb', line 64 def rules @rules end |
Instance Method Details
#inspect ⇒ Object
70 71 72 |
# File 'lib/rouge/regex_lexer.rb', line 70 def inspect "#<#{self.class.name} #{@name.inspect}>" end |