Class: Nemweb::DataRecord

Inherits:
Struct
  • Object
show all
Defined in:
lib/nemweb/data_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



3
4
5
# File 'lib/nemweb/data_record.rb', line 3

def data
  @data
end

#subtypeObject

Returns the value of attribute subtype

Returns:

  • (Object)

    the current value of subtype



3
4
5
# File 'lib/nemweb/data_record.rb', line 3

def subtype
  @subtype
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/nemweb/data_record.rb', line 3

def type
  @type
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



3
4
5
# File 'lib/nemweb/data_record.rb', line 3

def version
  @version
end

Instance Method Details

#to_hObject



5
6
7
8
9
10
11
12
# File 'lib/nemweb/data_record.rb', line 5

def to_h
  {
    "type" => type,
    "subtype" => subtype,
    "version" => version,
    "data" => data
  }
end