Class: Bookwatch::Ingest::DestinationDirectory

Inherits:
Struct
  • Object
show all
Defined in:
lib/bookwatch/ingest/destination_directory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#desired_destination_dir_nameObject

Returns the value of attribute desired_destination_dir_name

Returns:

  • (Object)

    the current value of desired_destination_dir_name



3
4
5
# File 'lib/bookwatch/ingest/destination_directory.rb', line 3

def desired_destination_dir_name
  @desired_destination_dir_name
end

#full_repo_nameObject

Returns the value of attribute full_repo_name

Returns:

  • (Object)

    the current value of full_repo_name



3
4
5
# File 'lib/bookwatch/ingest/destination_directory.rb', line 3

def full_repo_name
  @full_repo_name
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/bookwatch/ingest/destination_directory.rb', line 16

def ==(other)
  to_str == other
end

#to_strObject Also known as: to_s



4
5
6
7
8
9
10
11
12
# File 'lib/bookwatch/ingest/destination_directory.rb', line 4

def to_str
  if desired_destination_dir_name
    desired_destination_dir_name.to_s
  elsif full_repo_name
    full_repo_name.split('/').last
  else
    ""
  end
end