Class: Elf::Policy::DataBuilder

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

Instance Method Summary collapse

Methods included from BuilderHelper

#section_start

Constructor Details

#initialize(transition) ⇒ DataBuilder

Returns a new instance of DataBuilder.



235
236
237
# File 'lib/mithril/policy/dsl.rb', line 235

def initialize(transition)
  @transition = transition
end

Instance Method Details

#exec(v = true) ⇒ Object



245
246
247
248
# File 'lib/mithril/policy/dsl.rb', line 245

def exec(v=true)
  @transition.exec = v
  @transition.read ||= v
end

#read(v = true) ⇒ Object

TODO: Unify transitions? Intervaltree?



238
239
240
# File 'lib/mithril/policy/dsl.rb', line 238

def read(v=true) #TODO: Unify transitions? Intervaltree?
  @transition.read = v
end

#write(v = true) ⇒ Object



241
242
243
244
# File 'lib/mithril/policy/dsl.rb', line 241

def write(v=true)
  @transition.write = v
  @transition.read ||= v
end