Exception: Fortitude::Errors::DynamicAccessFromStaticMethod
- Defined in:
- lib/fortitude/errors.rb
Instance Attribute Summary collapse
-
#method_called ⇒ Object
readonly
Returns the value of attribute method_called.
-
#static_method_name ⇒ Object
readonly
Returns the value of attribute static_method_name.
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Instance Method Summary collapse
-
#initialize(widget, static_method_name, method_called) ⇒ DynamicAccessFromStaticMethod
constructor
A new instance of DynamicAccessFromStaticMethod.
Constructor Details
#initialize(widget, static_method_name, method_called) ⇒ DynamicAccessFromStaticMethod
Returns a new instance of DynamicAccessFromStaticMethod.
102 103 104 105 106 107 |
# File 'lib/fortitude/errors.rb', line 102 def initialize(, static_method_name, method_called) super(%{The widget class #{.class.name} declared method #{static_method_name.inspect} to be static, but, when we went to make it static, we found that it called #{method_called.inspect}, and that accesses dynamic data; this therefore can't possibly be made static safely.}) @widget = @static_method_name = static_method_name @method_called = method_called end |
Instance Attribute Details
#method_called ⇒ Object (readonly)
Returns the value of attribute method_called.
100 101 102 |
# File 'lib/fortitude/errors.rb', line 100 def method_called @method_called end |
#static_method_name ⇒ Object (readonly)
Returns the value of attribute static_method_name.
100 101 102 |
# File 'lib/fortitude/errors.rb', line 100 def static_method_name @static_method_name end |
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
100 101 102 |
# File 'lib/fortitude/errors.rb', line 100 def @widget end |