Class: Poros::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/poros/info.rb

Instance Method Summary collapse

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_pathObject



7
8
9
# File 'lib/poros/info.rb', line 7

def file_path
  @object.class.file_path(@object.uuid)
end

#to_hObject



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