mrblib/object.rb
# Get an attribute of an object.
# @api private
# @param name [String]
# @return [nil,Object] the attribute or +nil+ if it does not exist
Get an attribute of an object.
Get an attribute of an object .
def _attribute__get_attribute(name)
    restriction = self.class._attribute__assignment_restriction
    case restriction
    when :unavailable
      nil
    when :singleton_method
      return nil unless respond_to?(name)
      send(name)
    else 
      instance_variable_get("@#{name}")
    end
  end
def _attribute__get_attribute ( name ) restriction = self . class . _attribute__assignment_restriction case restriction when :unavailable nil when :singleton_method return nil unless respond_to? ( name ) send ( name ) else instance_variable_get ( "@#{name}" ) end end
Get an attribute of an object.
Get an attribute of an object .
# use instance variable
the attribute or +nil+ if it does not exist
the attribute or + nil + if it does not exist
nil,Object
name
<not_specific>
<not_specific>
None
api
None