class Ld::ParameterError

Attributes

clazz[RW]
hint[RW]

Public Class Methods

create(clazz, &block) click to toggle source
# File lib/ld/error/parameter_error.rb, line 9
def self.create clazz, &block
  runtime_error = self.new clazz
  block.call runtime_error
  runtime_error
end
new(clazz, hint) click to toggle source
# File lib/ld/error/parameter_error.rb, line 4
def initialize clazz, hint
  @clazz = clazz
  @hint = hint
end

Public Instance Methods

add_run() click to toggle source
# File lib/ld/error/parameter_error.rb, line 15
def add_run

end
raise(hash) click to toggle source
# File lib/ld/error/parameter_error.rb, line 19
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