class Pione::PNML::PioneModel

Public Instance Methods

indent(str, option) click to toggle source

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.

@param option [Hash] @option option [Integer] :level

indentation level, this should be non-negative integer
# 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