Exception: FifthedSim::Compiler::TransformError
- Inherits:
-
CompileError
- Object
- StandardError
- CompileError
- FifthedSim::Compiler::TransformError
- Defined in:
- lib/fifthed_sim/compiler.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#source_hash ⇒ Object
readonly
Returns the value of attribute source_hash.
Attributes inherited from CompileError
Instance Method Summary collapse
-
#initialize(hash) ⇒ TransformError
constructor
A new instance of TransformError.
Constructor Details
#initialize(hash) ⇒ TransformError
Returns a new instance of TransformError.
36 37 38 39 40 41 42 43 |
# File 'lib/fifthed_sim/compiler.rb', line 36 def initialize(hash) @message = "Could not transform" if hash.is_a? Hash @source_hash = hash @line, @char = hash.values.keep_if{|x| x.is_a? Parslet::Slice} .first.line_and_column end end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
45 46 47 |
# File 'lib/fifthed_sim/compiler.rb', line 45 def @message end |
#source_hash ⇒ Object (readonly)
Returns the value of attribute source_hash.
45 46 47 |
# File 'lib/fifthed_sim/compiler.rb', line 45 def source_hash @source_hash end |