Class: Pione::PNML::PioneModel
- Inherits:
-
Object
- Object
- Pione::PNML::PioneModel
- Defined in:
- lib/pione/pnml/pione-model.rb
Direct Known Subclasses
ConditionalBranch, ConstituentRule, Constraint, Data, Feature, Param, RuleDefinition, Ticket
Instance Method Summary collapse
-
#indent(str, option) ⇒ Object
Return an indented version of the string.
Instance Method Details
#indent(str, option) ⇒ Object
Return an indented version of the string. Indentation size is calculated
by the optional argument :level
. If the level is zero, return the
string as is.
496 497 498 499 500 |
# File 'lib/pione/pnml/pione-model.rb', line 496 def indent(str, option) str.lines.map do |line| (" " * (option[:level] || 0)) + line end.join end |