Class: Stupidedi::Editor::Error

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

Direct Known Subclasses

AK905, ClaimStatus, IK304, IK403, IK502, TA105

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Result

#warning?

Constructor Details

- (Error) initialize(zipper, action, code, reason)



58
59
60
61
# File 'lib/stupidedi/editor/result.rb', line 58

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

Instance Attribute Details

- (String) action (readonly)



53
54
55
# File 'lib/stupidedi/editor/result.rb', line 53

def action
  @action
end

- (String) code (readonly)



56
57
58
# File 'lib/stupidedi/editor/result.rb', line 56

def code
  @code
end

- (String) reason (readonly)



50
51
52
# File 'lib/stupidedi/editor/result.rb', line 50

def reason
  @reason
end

- (Zipper::AbstractCursor) zipper (readonly)



47
48
49
# File 'lib/stupidedi/editor/result.rb', line 47

def zipper
  @zipper
end

Instance Method Details

- (Boolean) error?



69
70
71
# File 'lib/stupidedi/editor/result.rb', line 69

def error?
  true
end

- (String) inspect



64
65
66
67
# File 'lib/stupidedi/editor/result.rb', line 64

def inspect
  name = self.class.name.split('::').last
  "#{name}(#{zipper.node.position.inspect}, #{@reason}, #{@zipper.node.inspect})"
end