Class: Inch::Evaluation::ObjectSchema
- Inherits:
-
Object
- Object
- Inch::Evaluation::ObjectSchema
- Extended by:
- Utils::ReadWriteMethods
- Defined in:
- lib/inch/evaluation/object_schema.rb
Overview
An ObjectSchema describes how important certain parts of the docs are for the associated Object
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #evaluate(object) ⇒ Object
-
#initialize(&block) ⇒ ObjectSchema
constructor
A new instance of ObjectSchema.
Methods included from Utils::ReadWriteMethods
Constructor Details
#initialize(&block) ⇒ ObjectSchema
Returns a new instance of ObjectSchema.
20 21 22 |
# File 'lib/inch/evaluation/object_schema.rb', line 20 def initialize(&block) @block = block end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
18 19 20 |
# File 'lib/inch/evaluation/object_schema.rb', line 18 def object @object end |
Instance Method Details
#evaluate(object) ⇒ Object
24 25 26 27 |
# File 'lib/inch/evaluation/object_schema.rb', line 24 def evaluate(object) @object = object instance_eval(&@block) end |