Class: Elf::Policy::TagBuilder

Inherits:
Object
  • Object
show all
Includes:
BuilderHelper
Defined in:
lib/mithril/policy/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BuilderHelper

#section_start

Constructor Details

#initialize(pol) ⇒ TagBuilder

Returns a new instance of TagBuilder.



219
220
221
222
# File 'lib/mithril/policy/dsl.rb', line 219

def initialize(pol)
  @policy = pol
  @ranges = []
end

Instance Attribute Details

#rangesObject

Returns the value of attribute ranges.



218
219
220
# File 'lib/mithril/policy/dsl.rb', line 218

def ranges
  @ranges
end

Instance Method Details

#range(low, high = nil) ⇒ Object



226
227
228
# File 'lib/mithril/policy/dsl.rb', line 226

def range(low,high=nil)
  @ranges << MemoryRange.new(low,high)
end

#section(name, file_name = "") ⇒ Object



223
224
225
# File 'lib/mithril/policy/dsl.rb', line 223

def section(name,file_name="")
  range(section_start(name,file_name))
end

#symbol(sym) ⇒ Object



229
230
231
# File 'lib/mithril/policy/dsl.rb', line 229

def symbol(sym)
  range(sym)
end