class SML::ProfileObjectHeaderEntry
Attributes
name[RW]
scaler[RW]
unit[RW]
Public Class Methods
construct(array_rep)
click to toggle source
# File lib/ruby-sml/sml-profileobjectheaderentry.rb, line 14 def self.construct(array_rep) return nil if array_rep.nil? name = array_rep.shift unit = array_rep.shift scaler = array_rep.shift array_rep.shift unless scaler.nil? return SML::ProfileObjectHeaderEntry.new(name, unit, scaler) end
new(name, unit, scaler)
click to toggle source
# File lib/ruby-sml/sml-profileobjectheaderentry.rb, line 8 def initialize(name, unit, scaler) @name = name @unit = unit @scaler = scaler end
Public Instance Methods
to_a()
click to toggle source
# File lib/ruby-sml/sml-profileobjectheaderentry.rb, line 23 def to_a result = [] << name << unit << scaler result << :int8 unless scaler.nil? return result end