Exception: Transpec::Syntax::InvalidContextError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/transpec/syntax.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_range, original_syntax, target_syntax) ⇒ InvalidContextError

Returns a new instance of InvalidContextError.



89
90
91
92
# File 'lib/transpec/syntax.rb', line 89

def initialize(source_range, original_syntax, target_syntax)
  @source_range = source_range
  @message = build_message(original_syntax, target_syntax)
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



87
88
89
# File 'lib/transpec/syntax.rb', line 87

def message
  @message
end

#source_rangeObject (readonly)

Returns the value of attribute source_range.



87
88
89
# File 'lib/transpec/syntax.rb', line 87

def source_range
  @source_range
end

Instance Method Details

#source_bufferObject



94
95
96
# File 'lib/transpec/syntax.rb', line 94

def source_buffer
  @source_range.source_buffer
end