Last active
December 15, 2015 11:59
-
-
Save pxlpnk/5257111 to your computer and use it in GitHub Desktop.
it works!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
→ curl -o vienna.rb https://gist.github.com/pxlpnk/5257111/raw/a577da6be4807daa4b4a2751659d100f7d1ba9f6/vienna.rb | |
→ irb -r "./vienna.rb" | |
>> v = Vienna.new | |
=> The next vienna.rb takes place at sektor5 Siebenbrunnengasse 44, 1050 Wien and starts at 2013-04-12 18:00:00 +0100. For more see: http://vienna-rb.at/blog/2013/03/19/second-meetup-to-take-place-at-co-working-space-sektor5/ | |
>> v.where? | |
=> #<struct Struct::Location name="sektor5", address="Siebenbrunnengasse 44, 1050 Wien", details=nil> | |
>> v.when? | |
=> 2013-04-12 18:00:00 +0100 | |
>> v.what_and_why? | |
=> #<URI::HTTP:0x007fc26983c9c0 URL:http://vienna-rb.at/blog/2013/03/19/second-meetup-to-take-place-at-co-working-space-sektor5/> | |
>> v.who? | |
=> {"Floor Drees"=>"@floordrees", "Anton Bangratz"=>"@tony_xpro", "Andreas Tiefenthaler"=>"@pxlpnk"} | |
>> v.version | |
=> "v0.0.3 - 2013-03-27 19:39" | |
>> puts v | |
The next vienna.rb takes place at sektor5 Siebenbrunnengasse 44, 1050 Wien and starts at 2013-04-12 18:00:00 +0100. For more see: http://vienna-rb.at/blog/2013/03/19/second-meetup-to-take-place-at-co-working-space-sektor5/ | |
=> nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
class Vienna | |
def contact | |
"@viennarb@" | |
end | |
def where? | |
Struct.new("Location", :name, :address, :details) | |
Struct::Location.new("sektor5", "Siebenbrunnengasse 44, 1050 Wien") | |
end | |
def when? | |
Time.new(2013,4,12, 18,00,0, "+01:00") | |
end | |
def what_and_why? | |
URI("http://vienna-rb.at/blog/2013/03/19/second-meetup-to-take-place-at-co-working-space-sektor5/") | |
end | |
def who? | |
organizers = { | |
"Floor Drees" => "@floordrees", | |
"Anton Bangratz" => "@tony_xpro", | |
"Andreas Tiefenthaler" => "@pxlpnk"} | |
end | |
def to_s | |
where = where?.to_a.compact.join(" ") | |
"The next vienna.rb takes place at #{where} and starts at #{when?}. For more see: #{what_and_why?}" | |
end | |
def version | |
"v0.0.3 - 2013-03-27 19:39" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment