Class: NotifierPlugin::AdapterGenerator::EntryProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/tecsgen/plugin/NotifierPlugin.rb

Overview

結合先に関する属性を含む.セル,受け口配列の添字から成る. 同一のEntryPropertyとなる結合は,全く同じ方法でその受け口関数を呼び 出せる.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cell, subscript) ⇒ EntryProperty

Returns a new instance of EntryProperty.



110
111
112
113
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 110

def initialize(cell, subscript)
  @cell = cell
  @subscript = subscript
end

Instance Attribute Details

#cellCell (readonly)

Returns 受け口側のセル..

Returns:

  • (Cell)

    受け口側のセル.



105
106
107
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 105

def cell
  @cell
end

#subscriptInteger? (readonly)

Returns 受け口配列の添字.配列でない場合はnil..

Returns:

  • (Integer, nil)

    受け口配列の添字.配列でない場合はnil.



108
109
110
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 108

def subscript
  @subscript
end

Class Method Details

.from_join(join) ⇒ Object



115
116
117
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 115

def self.from_join(join)
  EntryProperty.new(join.get_rhs_cell, join.get_rhs_subscript)
end

Instance Method Details

#eql?(o) ⇒ Boolean

同値性の定義.Hashのキーとして使用するのに必要.

Returns:

  • (Boolean)


120
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 120

def eql?(o) @cell == o.cell && @subscript == o.subscript end

#hashObject



122
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 122

def hash() @cell.hash ^ @subscript.hash end