Class: Resyma::Core::Field
- Inherits:
-
Object
- Object
- Resyma::Core::Field
- Defined in:
- lib/resyma/core/parsetree/definition.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#start ⇒ Object
Returns the value of attribute start.
-
#trans ⇒ Object
Returns the value of attribute trans.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, start, trans) ⇒ Field
constructor
Create an instance of Field, which is set and used by the matching algorithm.
Constructor Details
#initialize(id, start, trans) ⇒ Field
Create an instance of Field, which is set and used by the matching
algorithm
16 17 18 19 20 |
# File 'lib/resyma/core/parsetree/definition.rb', line 16 def initialize(id, start, trans) @id = id @start = start @trans = trans end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/resyma/core/parsetree/definition.rb', line 22 def id @id end |
#start ⇒ Object
Returns the value of attribute start.
22 23 24 |
# File 'lib/resyma/core/parsetree/definition.rb', line 22 def start @start end |
#trans ⇒ Object
Returns the value of attribute trans.
22 23 24 |
# File 'lib/resyma/core/parsetree/definition.rb', line 22 def trans @trans end |
Class Method Details
.clean_field ⇒ Object
24 25 26 27 28 |
# File 'lib/resyma/core/parsetree/definition.rb', line 24 def self.clean_field start = Hash.new { |hash, key| hash[key] = Set[] } trans = Hash.new { |hash, key| hash[key] = Set[] } new(-1, start, trans) end |