Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/prigner/extensions.rb
Instance Method Summary collapse
-
#get(file) ⇒ Object
For compatibilities with Net::HTTP.get method.
-
#port ⇒ Object
For compatibilities with the Net::HTTP.port method.
-
#start ⇒ Object
For compatibilities with the Net::HTTP.start method.
Instance Method Details
#get(file) ⇒ Object
For compatibilities with Net::HTTP.get method.
61 62 63 64 65 66 67 |
# File 'lib/prigner/extensions.rb', line 61 def get(file) result = self.join(file.gsub(/^\/(.*?)$/){$1}) def result.to_s return [self.inspect, self.read].join("\n") end result end |
#port ⇒ Object
For compatibilities with the Net::HTTP.port method.
76 77 78 |
# File 'lib/prigner/extensions.rb', line 76 def port nil end |
#start ⇒ Object
For compatibilities with the Net::HTTP.start method.
81 82 83 |
# File 'lib/prigner/extensions.rb', line 81 def start block_given? ? (yield self) : self end |