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.



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

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

Instance Attribute Details

#reasonString (readonly)

Returns:

  • (String)


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

def reason
  @reason
end

#zipperZipper::AbstractCursor (readonly)



24
25
26
# File 'lib/stupidedi/editor/result.rb', line 24

def zipper
  @zipper
end

Instance Method Details

#inspectString

Returns:

  • (String)


35
36
37
# File 'lib/stupidedi/editor/result.rb', line 35

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

#warning?Boolean

Returns:

  • (Boolean)


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

def warning?
  true
end