Class: LinkedinV2::Url::Builder
- Inherits:
-
Object
- Object
- LinkedinV2::Url::Builder
- Defined in:
- lib/linkedin_v2/url/builder.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#call(key, **options) ⇒ Object
key -> Symbol object - Name of method to get endpoint Files::Reader.
Class Method Details
.call(key, **options) ⇒ Object
6 7 8 |
# File 'lib/linkedin_v2/url/builder.rb', line 6 def self.call(key, **) new.(key, ) end |
Instance Method Details
#call(key, **options) ⇒ Object
key -> Symbol object - Name of method to get endpoint Files::Reader. options -> Hash object - Each method needs a specific parameter
12 13 14 15 16 17 18 |
# File 'lib/linkedin_v2/url/builder.rb', line 12 def call(key, **) path = .empty? ? send(key) : send(key, Helpers::Url.escape(**)) path.strip rescue NoMethodError, ArgumentError => exception raise InvalidEndpointError.new("endpoint not found", details: exception.) end |