Guest User

Untitled

a guest
Apr 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.24 KB | None | 0 0
  1. module Gds
  2.   class Base
  3.     props :schema, :host
  4.  
  5.     def to_url
  6.       "#{@schema}://#{@host}"
  7.     end
  8.   end
  9.  
  10.   class Example < Base
  11.     schema 'http'
  12.     host   'localhost'
  13.   end
  14. end
  15.  
  16. e = Gds::Example.new
  17. puts "!#{e.to_url}!"
Add Comment
Please, Sign In to add comment