Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Imagine this is fpdf/fpdf_rotate.rb
- module PDF_Rotate
- def initialize
- @angle = 0
- end
- end
- # Then in some other class:
- class SomePDF
- require 'fpdf/fpdf_rotate'
- extend(PDF_Rotate)
- end
- foo = SomePDF.new
- puts foo.angle
- # angle will be undefined. How to define @angle in the module so that it inherits up to the class?
Add Comment
Please, Sign In to add comment