core/rails/app/models/attrib.rb
# If we were asked to do something with an attribute on a node,
# but that attribute is part of a node role bound to that node,
# use the node role instead.
If we were asked to do something with an attribute on a node,
but that attribute is part of a node role bound to that node,
use the node role instead.
If we were asked to do something with an attribute on a node but that attribute is part of a node role bound to that node use the node role instead .
def __resolve(to)
    case
    when (to.is_a?(Node) && self.role_id) then to.node_roles.find_by!(:role_id => self.role_id)
    when (to.is_a?(Deployment) && self.role_id) then to.deployment_roles.find_by!(:role_id => self.role_id)
    when [Node,Role,DeploymentRole,NodeRole,Hash].any?{|klass|to.is_a?(klass)} then to
    else raise "#{to.class.name} is not something that we can use Attribs with!"
    end
  end
def __resolve ( to ) case when ( to . is_a? ( Node ) && self . role_id ) then to . node_roles . find_by! ( :role_id => self . role_id ) when ( to . is_a? ( Deployment ) && self . role_id ) then to . deployment_roles . find_by! ( :role_id => self . role_id ) when [ Node , Role , DeploymentRole , NodeRole , Hash ] . any? { | klass | to . is_a? ( klass ) } then to else raise "#{to.class.name} is not something that we can use Attribs with!" end end
If we were asked to do something with an attribute on a node,
but that attribute is part of a node role bound to that node,
use the node role instead.
If we were asked to do something with an attribute on a node but that attribute is part of a node role bound to that node use the node role instead .
to
<not_specific>