Class: BinData::DSLMixin::UnSanitizedField
- Inherits:
-
Array
- Object
- Array
- BinData::DSLMixin::UnSanitizedField
- Defined in:
- lib/bindata/dsl.rb
Overview
An array containing a field definition of the form expected by BinData::Struct.
Instance Method Summary collapse
-
#initialize(type, name, params) ⇒ UnSanitizedField
constructor
A new instance of UnSanitizedField.
- #name ⇒ Object
- #params ⇒ Object
- #to_type_params ⇒ Object
- #type ⇒ Object
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
#name ⇒ Object
38 39 40 |
# File 'lib/bindata/dsl.rb', line 38 def name self[1] end |
#params ⇒ Object
41 42 43 |
# File 'lib/bindata/dsl.rb', line 41 def params self[2] end |
#to_type_params ⇒ Object
44 45 46 |
# File 'lib/bindata/dsl.rb', line 44 def to_type_params [self.type, self.params] end |
#type ⇒ Object
35 36 37 |
# File 'lib/bindata/dsl.rb', line 35 def type self[0] end |