Class: Rose::Attribute::Direct

Inherits:
Rose::Attribute show all
Defined in:
lib/rose/attribute.rb

Overview

This class defines an Attribute whose value is defined via a method

Instance Attribute Summary

Attributes inherited from Rose::Attribute

#column_name, #method_name

Instance Method Summary collapse

Methods inherited from Rose::Attribute

#initialize

Constructor Details

This class inherits a constructor from Rose::Attribute

Instance Method Details

#evaluate(item) ⇒ Object



32
33
34
35
36
# File 'lib/rose/attribute.rb', line 32

def evaluate(item)
  if item.respond_to?(@method_name.to_sym)
    item.__send__(@method_name)
  end
end