Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # abstract
- module Interface
- class Adapter
- def required_behavior(data, args)
- raise NotImplementedError, 'Must be implemented by child class!'
- end
- end
- end
- # concrete
- module Interface
- class SpecificAdapter < Adapter
- def required_behavior(data, args)
- data.each { |record| specific_behavior(record, args) }
- end
- private
- def specific_behavior(record, args)
- # do stuff to a record with the provided args
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement