Class: PGExaminer::Result::Item

Inherits:
Base
  • Object
show all
Defined in:
lib/pg_examiner/result/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #diff, #diffable_attrs, #diffable_lists, #diffable_methods

Constructor Details

#initialize(result, row, parent = nil) ⇒ Item

Returns a new instance of Item.



8
9
10
# File 'lib/pg_examiner/result/item.rb', line 8

def initialize(result, row, parent = nil)
  @result, @row, @parent = result, row, parent
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



6
7
8
# File 'lib/pg_examiner/result/item.rb', line 6

def parent
  @parent
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/pg_examiner/result/item.rb', line 6

def result
  @result
end

#rowObject (readonly)

Returns the value of attribute row.



6
7
8
# File 'lib/pg_examiner/result/item.rb', line 6

def row
  @row
end

Instance Method Details

#inspectObject



20
21
22
# File 'lib/pg_examiner/result/item.rb', line 20

def inspect
  "#<#{self.class} @row=#{@row.inspect}>"
end

#nameObject



16
17
18
# File 'lib/pg_examiner/result/item.rb', line 16

def name
  @row['name']
end

#oidObject



12
13
14
# File 'lib/pg_examiner/result/item.rb', line 12

def oid
  @row['oid']
end