Sha256: 44997c99de13d46ad01c213fd3f70533555157bfdf70159b80df775a50c32ffe

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

class Ld::ParameterError
  attr_accessor :clazz, :hint

  def initialize clazz, hint
    @clazz = clazz
    @hint = hint
  end

  def self.create clazz, &block
    runtime_error = self.new clazz
    block.call runtime_error
    runtime_error
  end

  def add_run

  end

  def raise hash
    lines = []
    case hash[:error_type]
      when :example
        lines =
      when :scope
        lines = [
            "scope参数说明:",
            "  1 不能为空",
            "  2 格式'单元格1:单元格2',如'A1:B2'代表读取以A1与B2为对角的矩形范围中的所有内容",
        ]
    end

    lines.each{|line| puts line}

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ld-0.3.6 lib/ld/error/parameter_error.rb