class Realm::ROM::ReadOnlyRepositoryWrapper

Public Class Methods

new(repo) click to toggle source
Calls superclass method
# File lib/realm/rom/read_only_repository_wrapper.rb, line 6
def initialize(repo)
  @repo = repo.clone
  @repo.define_singleton_method(:root) { ReadOnlyRelationWrapper.new(super()) }
end

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/realm/rom/read_only_repository_wrapper.rb, line 11
def method_missing(name, *args, &block)
  @repo.send(name, *args, &block)
rescue Persistence::RelationIsReadOnly
  raise Persistence::RepositoryIsReadOnly, @repo
end
respond_to_missing?(*args) click to toggle source
# File lib/realm/rom/read_only_repository_wrapper.rb, line 17
def respond_to_missing?(*args)
  @repo.respond_to?(*args)
end