Class: EPO::Observer::Source
- Inherits:
-
Struct
- Object
- Struct
- EPO::Observer::Source
- Defined in:
- lib/epo/core/observer.rb
Overview
in EPO, the source of an observation is:
-
a db object able to make a ruby object from a file path
-
a file path
Instance Attribute Summary collapse
-
#db ⇒ Object
Returns the value of attribute db.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#db ⇒ Object
Returns the value of attribute db
15 16 17 |
# File 'lib/epo/core/observer.rb', line 15 def db @db end |
#path ⇒ Object
Returns the value of attribute path
15 16 17 |
# File 'lib/epo/core/observer.rb', line 15 def path @path end |
Instance Method Details
#observe {|db.read_file(path)| ... } ⇒ Object
16 17 18 |
# File 'lib/epo/core/observer.rb', line 16 def observe yield db.read_file(path) end |