Class: Low::LocalProxy
- Includes:
- ErrorHandling
- Defined in:
- lib/proxies/local_proxy.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#start_line ⇒ Object
readonly
Returns the value of attribute start_line.
-
#type_expression ⇒ Object
readonly
Returns the value of attribute type_expression.
Instance Method Summary collapse
- #error_message(value:) ⇒ Object
- #error_type ⇒ Object
-
#initialize(type_expression:, name:, file_path:, start_line:, scope:) ⇒ LocalProxy
constructor
A new instance of LocalProxy.
Methods included from ErrorHandling
Constructor Details
#initialize(type_expression:, name:, file_path:, start_line:, scope:) ⇒ LocalProxy
Returns a new instance of LocalProxy.
12 13 14 15 16 17 18 19 |
# File 'lib/proxies/local_proxy.rb', line 12 def initialize(type_expression:, name:, file_path:, start_line:, scope:) @file_path = file_path @start_line = start_line @scope = scope @type_expression = type_expression @name = name end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
10 11 12 |
# File 'lib/proxies/local_proxy.rb', line 10 def file_path @file_path end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/proxies/local_proxy.rb', line 10 def name @name end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
10 11 12 |
# File 'lib/proxies/local_proxy.rb', line 10 def scope @scope end |
#start_line ⇒ Object (readonly)
Returns the value of attribute start_line.
10 11 12 |
# File 'lib/proxies/local_proxy.rb', line 10 def start_line @start_line end |
#type_expression ⇒ Object (readonly)
Returns the value of attribute type_expression.
10 11 12 |
# File 'lib/proxies/local_proxy.rb', line 10 def type_expression @type_expression end |
Instance Method Details
#error_message(value:) ⇒ Object
25 26 27 |
# File 'lib/proxies/local_proxy.rb', line 25 def (value:) "Invalid variable type #{output(value:)} in '#{name.class}:#{@start_line}'. Valid types: '#{type_expression.valid_types}'" end |
#error_type ⇒ Object
21 22 23 |
# File 'lib/proxies/local_proxy.rb', line 21 def error_type LocalTypeError end |