Class: BinData::DSLMixin::UnSanitizedField

Inherits:
Array
  • Object
show all
Defined in:
lib/bindata/dsl.rb

Overview

An array containing a field definition of the form expected by BinData::Struct.

Instance Method Summary collapse

Constructor Details

#initialize(type, name, params) ⇒ UnSanitizedField

Returns a new instance of UnSanitizedField.



31
32
33
34
# File 'lib/bindata/dsl.rb', line 31

def initialize(type, name, params)
  super()
  self << type << name << params
end

Instance Method Details

#nameObject



38
39
40
# File 'lib/bindata/dsl.rb', line 38

def name
  self[1]
end

#paramsObject



41
42
43
# File 'lib/bindata/dsl.rb', line 41

def params
  self[2]
end

#to_type_paramsObject



44
45
46
# File 'lib/bindata/dsl.rb', line 44

def to_type_params
  [self.type, self.params]
end

#typeObject



35
36
37
# File 'lib/bindata/dsl.rb', line 35

def type
  self[0]
end