Class: Poros::Info
- Inherits:
-
Object
- Object
- Poros::Info
- Defined in:
- lib/poros/info.rb
Instance Method Summary collapse
- #file_path ⇒ Object
-
#initialize(object) ⇒ Info
constructor
A new instance of Info.
- #to_h ⇒ Object
Constructor Details
#initialize(object) ⇒ Info
Returns a new instance of Info.
3 4 5 |
# File 'lib/poros/info.rb', line 3 def initialize(object) @object = object end |
Instance Method Details
#file_path ⇒ Object
7 8 9 |
# File 'lib/poros/info.rb', line 7 def file_path @object.class.file_path(@object.uuid) end |
#to_h ⇒ Object
11 12 13 14 15 |
# File 'lib/poros/info.rb', line 11 def to_h @object.class.poro_attrs.map { |column| [column, @object.send(column.to_s)] }.to_h end |