Sha256: b3141aa57573c25cbdf0ec2ce3a71f38d05379f7860ba5051274a6d96a3cb950
Contents?: true
Size: 440 Bytes
Versions: 6
Compression:
Stored size: 440 Bytes
Contents
# Base Module for ViewModels. # module ViewModels # Extracts controllers for a living from unsuspecting views. # class ControllerExtractor attr_reader :context def initialize context @context = context end # Extracts a controller from the context. # def extract context = self.context context.respond_to?(:controller) ? context.controller : context end end end
Version data entries
6 entries across 6 versions & 1 rubygems