Class: Stupidedi::Editor::Warning

Inherits:
Result
  • Object
show all
Defined in:
lib/stupidedi/editor/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Result

#error?

Constructor Details

#initialize(zipper, reason) ⇒ Warning

Returns a new instance of Warning.


32
33
34
35
# File 'lib/stupidedi/editor/result.rb', line 32

def initialize(zipper, reason)
  @zipper, @reason =
    zipper, reason
end

Instance Attribute Details

#reasonString (readonly)

Returns:

  • (String)

30
31
32
# File 'lib/stupidedi/editor/result.rb', line 30

def reason
  @reason
end

#zipperZipper::AbstractCursor (readonly)


27
28
29
# File 'lib/stupidedi/editor/result.rb', line 27

def zipper
  @zipper
end

Instance Method Details

#inspectString

Returns:

  • (String)

38
39
40
# File 'lib/stupidedi/editor/result.rb', line 38

def inspect
  "Warning(#{@reason}, #{@zipper.node.inspect})"
end

#warning?Boolean

Returns:

  • (Boolean)

42
43
44
# File 'lib/stupidedi/editor/result.rb', line 42

def warning?
  true
end