Class: Pione::PNML::ConstituentRule
- Inherits:
-
Perspective
- Object
- Perspective
- 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 Perspective
action_rule?, compact, eliminate_comment, empty?, file?, flow_rule?, modifier, named?, net_input?, net_output?, normalize_data_name, param?, remove_comment, rule?, ticket?
Constructor Details
#initialize(type, name) ⇒ ConstituentRule
Returns a new instance of ConstituentRule.
191 192 193 194 195 |
# File 'lib/pione/pnml/pione-model.rb', line 191 def initialize(type, name) @type = type @name = name @params = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
184 185 186 |
# File 'lib/pione/pnml/pione-model.rb', line 184 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
185 186 187 |
# File 'lib/pione/pnml/pione-model.rb', line 185 def params @params end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
183 184 185 |
# File 'lib/pione/pnml/pione-model.rb', line 183 def type @type end |
Instance Method Details
#as_declaration(option = {}) ⇒ String
Return a declaration of constituent rule.
201 202 203 |
# File 'lib/pione/pnml/pione-model.rb', line 201 def as_declaration(option={}) indent("rule %s" % textize_rule_expr, option) end |