Class: Inch::Evaluation::ObjectSchema

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Utils::ReadWriteMethods

rw_method, rw_methods

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

#objectObject (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