Class: Elf::Policy::TagBuilder
- Inherits:
-
Object
- Object
- Elf::Policy::TagBuilder
- Includes:
- BuilderHelper
- Defined in:
- lib/mithril/policy/dsl.rb
Instance Attribute Summary collapse
-
#ranges ⇒ Object
Returns the value of attribute ranges.
Instance Method Summary collapse
-
#initialize(pol) ⇒ TagBuilder
constructor
A new instance of TagBuilder.
- #range(low, high = nil) ⇒ Object
- #section(name, file_name = "") ⇒ Object
- #symbol(sym) ⇒ Object
Methods included from BuilderHelper
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
#ranges ⇒ Object
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 |