Class: Repomen::Repo::Service::Base
- Inherits:
-
Object
- Object
- Repomen::Repo::Service::Base
- Defined in:
- lib/repomen/repo/service/base.rb
Constant Summary collapse
- SERVICE_REGEXP =
//
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #applicable? ⇒ Boolean
-
#initialize(url) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
Constructor Details
#initialize(url) ⇒ Base
Returns a new instance of Base.
14 15 16 |
# File 'lib/repomen/repo/service/base.rb', line 14 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/repomen/repo/service/base.rb', line 7 def url @url end |
Instance Method Details
#applicable? ⇒ Boolean
10 11 12 |
# File 'lib/repomen/repo/service/base.rb', line 10 def applicable? url =~ SERVICE_REGEXP end |
#name ⇒ Object
18 19 20 |
# File 'lib/repomen/repo/service/base.rb', line 18 def name self.class.to_s.split("::").last.underscore.to_sym end |