Class: Stupidedi::Editor::Warning
- Defined in:
- lib/stupidedi/editor/result.rb
Instance Attribute Summary collapse
- #reason ⇒ String readonly
- #zipper ⇒ Zipper::AbstractCursor readonly
Instance Method Summary collapse
-
#initialize(zipper, reason) ⇒ Warning
constructor
A new instance of Warning.
- #inspect ⇒ String
- #warning? ⇒ Boolean
Methods inherited from Result
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
#reason ⇒ String (readonly)
27 28 29 |
# File 'lib/stupidedi/editor/result.rb', line 27 def reason @reason end |
#zipper ⇒ Zipper::AbstractCursor (readonly)
24 25 26 |
# File 'lib/stupidedi/editor/result.rb', line 24 def zipper @zipper end |
Instance Method Details
#inspect ⇒ String
35 36 37 |
# File 'lib/stupidedi/editor/result.rb', line 35 def inspect "Warning(#{@reason}, #{@zipper.node.inspect})" end |
#warning? ⇒ Boolean
39 40 41 |
# File 'lib/stupidedi/editor/result.rb', line 39 def warning? true end |