Class: MkAcl::Stamp
- Inherits:
-
Object
- Object
- MkAcl::Stamp
- Defined in:
- lib/mikras_utils/mkacl/spec.rb
Instance Attribute Summary collapse
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#stamp ⇒ Object
Returns the value of attribute stamp.
-
#value ⇒ Object
Returns the value of attribute value.
-
#watch ⇒ Object
Returns the value of attribute watch.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(rule, watch, stamp, value) ⇒ Stamp
constructor
A new instance of Stamp.
- #to_s ⇒ Object
Constructor Details
#initialize(rule, watch, stamp, value) ⇒ Stamp
Returns a new instance of Stamp.
301 302 303 304 305 306 307 308 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 301 def initialize(rule, watch, stamp, value) constrain rule, Rule constrain watch, String, nil constrain stamp, String @rule = rule @watch, @stamp, @value = watch, stamp, value rule.send :attach_stamp, self end |
Instance Attribute Details
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
293 294 295 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 293 def rule @rule end |
#stamp ⇒ Object
Returns the value of attribute stamp.
298 299 300 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 298 def stamp @stamp end |
#value ⇒ Object
Returns the value of attribute value.
299 300 301 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 299 def value @value end |
#watch ⇒ Object
Returns the value of attribute watch.
297 298 299 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 297 def watch @watch end |
Instance Method Details
#dump ⇒ Object
312 313 314 315 316 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 312 def dump puts "watch: #{watch}" if watch puts "stamp: #{stamp}" if stamp puts "value: #{value}" if value end |
#to_s ⇒ Object
310 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 310 def to_s() = watch ? "#{watch}->#{stamp}" : stamp |