Class: Locomotive::RelationalAlgebra::OffsetType

Inherits:
ColumnStructureEntry show all
Includes:
XML
Defined in:
lib/locomotive/relational_algebra/query_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XML

included, #quote

Constructor Details

#initialize(offset, type) ⇒ OffsetType

Returns a new instance of OffsetType.



186
187
188
189
# File 'lib/locomotive/relational_algebra/query_information.rb', line 186

def initialize(offset, type)
  @offset = offset
  @type   = type
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



183
184
185
# File 'lib/locomotive/relational_algebra/query_information.rb', line 183

def offset
  @offset
end

#typeObject (readonly)

Returns the value of attribute type.



183
184
185
# File 'lib/locomotive/relational_algebra/query_information.rb', line 183

def type
  @type
end

Instance Method Details

#cloneObject



199
200
201
202
# File 'lib/locomotive/relational_algebra/query_information.rb', line 199

def clone
  OffsetType.new(offset.clone,
                 type.clone)
end

#itemsObject



191
192
193
# File 'lib/locomotive/relational_algebra/query_information.rb', line 191

def items
  [offset]
end

#offsetsObject



195
196
197
# File 'lib/locomotive/relational_algebra/query_information.rb', line 195

def offsets
  [self]
end

#to_xmlObject



204
205
206
# File 'lib/locomotive/relational_algebra/query_information.rb', line 204

def to_xml
  offset_ :item => offset.to_xml, :type => type.to_xml
end