Class: Pione::PNML::ConstituentRule
- Inherits:
-
PioneModel
- Object
- PioneModel
- Pione::PNML::ConstituentRule
- Defined in:
- lib/pione/pnml/pione-model.rb
Overview
ConstituentRule is a class represents PIONE's constituent rule.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#as_declaration(option = {}) ⇒ String
Return a declaration of constituent rule.
-
#initialize(type, name) ⇒ ConstituentRule
constructor
A new instance of ConstituentRule.
Methods inherited from PioneModel
Constructor Details
#initialize(type, name) ⇒ ConstituentRule
Returns a new instance of ConstituentRule.
513 514 515 516 517 |
# File 'lib/pione/pnml/pione-model.rb', line 513 def initialize(type, name) @type = type @name = name @params = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
506 507 508 |
# File 'lib/pione/pnml/pione-model.rb', line 506 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
507 508 509 |
# File 'lib/pione/pnml/pione-model.rb', line 507 def params @params end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
505 506 507 |
# File 'lib/pione/pnml/pione-model.rb', line 505 def type @type end |
Instance Method Details
#as_declaration(option = {}) ⇒ String
Return a declaration of constituent rule.
523 524 525 |
# File 'lib/pione/pnml/pione-model.rb', line 523 def as_declaration(option={}) indent("rule %s" % textize_rule_expr, option) end |