Class: Contraction::Parser::ReturnLine

Inherits:
TypedLine
  • Object
show all
Defined in:
lib/parser/lines.rb

Instance Attribute Summary

Attributes inherited from TypedLine

#contract, #message, #type, #types

Instance Method Summary collapse

Methods inherited from TypedLine

#evaluate_in_context, #initialize, #parse_type, #valid?

Constructor Details

This class inherits a constructor from Contraction::Parser::TypedLine

Instance Method Details

#contract_message(value, method_name = nil) ⇒ Object



59
60
61
# File 'lib/parser/lines.rb', line 59

def contract_message(value, method_name=nil)
  "Return value of #{method_name} (#{message}) must fullfill #{contract.inspect}, but is #{value}"
end

#nameObject



55
56
57
# File 'lib/parser/lines.rb', line 55

def name
  nil
end