Class: Ms::Mascot::Dat::Query

Inherits:
Section
  • Object
show all
Defined in:
lib/ms/mascot/dat/query.rb

Constant Summary

Constants inherited from Section

Section::CONTENT_TYPE_REGEXP, Section::TO_S_FORMAT

Instance Attribute Summary collapse

Attributes inherited from Section

#data, #section_name

Instance Method Summary collapse

Methods inherited from Section

parse, section_name, #to_s

Constructor Details

#initialize(data = {}, section_name = self.class.section_name) ⇒ Query

Returns a new instance of Query.



7
8
9
10
# File 'lib/ms/mascot/dat/query.rb', line 7

def initialize(data={}, section_name=self.class.section_name)
  super(data, section_name)
  @index = section_name.strip[5..-1].to_i
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



5
6
7
# File 'lib/ms/mascot/dat/query.rb', line 5

def index
  @index
end