Module: TripletHandling
- Included in:
- URI
- Defined in:
- lib/uri/triplets.rb
Constant Summary collapse
- TRIPLET_CLASSES =
%w(Git SCP SSH).freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
85 86 87 |
# File 'lib/uri/triplets.rb', line 85 def self.included(base) base.extend(TripletHandling) end |
Instance Method Details
#default_triplet_type ⇒ Object
89 90 91 |
# File 'lib/uri/triplets.rb', line 89 def default_triplet_type @default_triplet_type ||= "SSH" end |
#default_triplet_type=(value) ⇒ Object
93 94 95 96 97 98 |
# File 'lib/uri/triplets.rb', line 93 def default_triplet_type=(value) unless TRIPLET_CLASSES.include?(value) raise ArgumentError, "'#{value}' is not one of: #{TRIPLET_CLASSES.join(', ')}" end @default_triplet_type = value end |