Module: Resilience::OnImage
- Included in:
- Attribute, BootTable, FSDir::DirBase, FSDir::Record, ObjectTable, ObjectTree, Page, RootDir, SystemTable
- Defined in:
- lib/resilience/mixins/on_image.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.image ⇒ Object
11 12 13 |
# File 'lib/resilience/mixins/on_image.rb', line 11 def self.image @image ||= Resilience::Image.new end |
.included(base) ⇒ Object
7 8 9 |
# File 'lib/resilience/mixins/on_image.rb', line 7 def self.included(base) base.extend(ClassMethods) end |
.restore_pos ⇒ Object
20 21 22 |
# File 'lib/resilience/mixins/on_image.rb', line 20 def self.restore_pos image.seek @image_pos.shift end |
.store_pos ⇒ Object
15 16 17 18 |
# File 'lib/resilience/mixins/on_image.rb', line 15 def self.store_pos @image_pos ||= [] @image_pos.unshift image.pos end |
Instance Method Details
#image ⇒ Object
24 25 26 |
# File 'lib/resilience/mixins/on_image.rb', line 24 def image OnImage.image end |
#restore_pos ⇒ Object
32 33 34 |
# File 'lib/resilience/mixins/on_image.rb', line 32 def restore_pos OnImage.restore_pos end |