class Bookbinder::Ingest::RepoIdentifier
Constants
- DEFAULT_VCS_PREFIX
Attributes
input_identifier[R]
Public Class Methods
new(input_identifier)
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 6 def initialize(input_identifier) @input_identifier = input_identifier end
Public Instance Methods
==(other)
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 34 def ==(other) to_str == other end
Also aliased as: eql?
hash()
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 30 def hash to_str.hash end
inspect()
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 22 def inspect %Q("#{to_s}") end
split(*args)
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 26 def split(*args) input_identifier.split(*args) end
to_str()
click to toggle source
# File lib/bookbinder/ingest/repo_identifier.rb, line 10 def to_str if input_identifier.nil? "" elsif input_identifier.include?(':') || input_identifier.match(/^\//) input_identifier else "#{DEFAULT_VCS_PREFIX}#{input_identifier}" end end
Also aliased as: to_s