Created
August 19, 2021 19:39
-
-
Save elrayle/6732881012111fe2c3839b3034afaf24 to your computer and use it in GitHub Desktop.
Allow AF or Valkyrie everywhere
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def method_missing(method_name, *args, &block) | |
resource = self.valkyrie_resource | |
super unless resource.respond_to? method_name | |
resource.public_send(method_name, *arguments, &block) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def method_missing(method_name, *args, &block) | |
af_object = Wings::ActiveFedoraConverter.new(resource: self).convert | |
super unless af_object.respond_to? method_name | |
af_object.public_send(method_name, *arguments, &block) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we have the class, we could avoid creating the instance until we know it is needed by using...
and