Class: Rockstar::Metro
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, country) ⇒ Metro
constructor
A new instance of Metro.
Methods inherited from Base
connection, fetch_and_parse, get_instance
Constructor Details
#initialize(name, country) ⇒ Metro
Returns a new instance of Metro.
15 16 17 18 19 20 |
# File 'lib/rockstar/metro.rb', line 15 def initialize(name, country) raise ArgumentError, "Name is required" if name.blank? raise ArgumentError, "Country is required" if country.blank? @name = name @country = country end |
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/rockstar/metro.rb', line 4 def country @country end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/rockstar/metro.rb', line 4 def name @name end |