Class: MkAcl::StampExpr

Inherits:
Object
  • Object
show all
Defined in:
lib/mikras_utils/mkacl/spec.rb

Overview

For debug. Express the structure of stamp syntax

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule, watch, stamp, value) ⇒ StampExpr

Returns a new instance of StampExpr.



327
328
329
330
331
332
# File 'lib/mikras_utils/mkacl/spec.rb', line 327

def initialize(rule, watch, stamp, value)
  constrain rule, Rule
  @rule = rule
  @watch, @stamp, @value = watch, stamp, value
  rule.send :attach_stamp_expr, self
end

Instance Attribute Details

#ruleObject (readonly)

Returns the value of attribute rule.



320
321
322
# File 'lib/mikras_utils/mkacl/spec.rb', line 320

def rule
  @rule
end

#stampObject

String


324
325
326
# File 'lib/mikras_utils/mkacl/spec.rb', line 324

def stamp
  @stamp
end

#valueObject

Returns the value of attribute value.



325
326
327
# File 'lib/mikras_utils/mkacl/spec.rb', line 325

def value
  @value
end

#watchObject

String


323
324
325
# File 'lib/mikras_utils/mkacl/spec.rb', line 323

def watch
  @watch
end

Instance Method Details

#dumpObject



336
337
338
339
340
# File 'lib/mikras_utils/mkacl/spec.rb', line 336

def dump
  puts "watch: #{watch.join(" ")}" if watch
  puts "stamp: #{stamp.join(" ")}" if stamp
  puts "value: #{value}" if value
end

#to_sObject



334
# File 'lib/mikras_utils/mkacl/spec.rb', line 334

def to_s() = watch