Exception: Fortitude::Errors::DynamicAccessFromStaticMethod

Inherits:
Base
  • Object
show all
Defined in:
lib/fortitude/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(widget, static_method_name, method_called)
  super(%{The widget class #{widget.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 = widget
  @static_method_name = static_method_name
  @method_called = method_called
end

Instance Attribute Details

#method_calledObject (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_nameObject (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

#widgetObject (readonly)

Returns the value of attribute widget.



100
101
102
# File 'lib/fortitude/errors.rb', line 100

def widget
  @widget
end