::Myco::Decorator << {
# Implement the apply meme to mutate the incoming meme in more custom ways. # This is run after transforms.apply has already mutated the meme. apply: |meme, *args| { } [transforms] # Implement one of the recognized transform memes to # set the corresponding property of the incoming meme. apply: |meme, *args| { # TODO: make order-agnostic by waiting to assign until all have run self .? target(meme) .tap |x| { meme.target = x } self .? name(meme) .tap |x| { meme.name = x } self .? body(meme) .tap |x| { meme.body = x } self .? cache(meme) .tap |x| { meme.cache = x } self .? var(meme) .tap |x| { meme.var = x } self .? expose(meme) .tap |x| { meme.expose = x } }
}