2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-03-26 16:52:59 +00:00
|
|
|
|
|
|
|
# Rex::Struct2
|
|
|
|
module Rex
|
|
|
|
module Struct2
|
|
|
|
|
|
|
|
# this is a "constant" element. It's not actually constant, you can set it
|
|
|
|
# via the constructor and value. It doesn't do from_s/to_s, etc.
|
|
|
|
|
|
|
|
# what use is it? Well it's useful for doing constant restraints (like fix
|
|
|
|
# sized arrays), and probably not a ton more.
|
|
|
|
|
|
|
|
class Constant
|
|
|
|
|
2005-07-09 21:18:49 +00:00
|
|
|
require 'rex/struct2/element'
|
2005-03-26 16:52:59 +00:00
|
|
|
include Rex::Struct2::Element
|
|
|
|
|
|
|
|
def initialize(value)
|
|
|
|
self.value = value
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
# end Rex::Struct2
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|