Sha256: d52b7a4b7ffe1ea422fe76b953b8b11fc6d43c5268b74f81ff9549bd5c62c730

Contents?: true

Size: 839 Bytes

Versions: 18

Compression:

Stored size: 839 Bytes

Contents

# This class loads any local file and is most commonly used to load a local
# Bosonfile. Since this file doesn't exist inside a normal Repo, it is not indexed with any repo.
# Since file-based libraries need to be associated with a repository, Boson associates it
# with a local repository if it exists or defaults to Boson.repo. See Boson::FileLibrary
# for more info about this library.
#
# Example:
#   >> load_library 'Bosonfile'
#   => true
class Boson::LocalFileLibrary < Boson::FileLibrary
  handles {|source|
    @repo = (File.exists?(source.to_s) ? (Boson.local_repo || Boson.repo) : nil)
    !!@repo
  }

  #:stopdoc:
  def set_name(name)
    @lib_file = File.expand_path(name.to_s)
    File.basename(@lib_file).downcase
  end

  def base_module
    Boson::Commands
  end

  def library_file
    @lib_file
  end
  #:startdoc:
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
boson-more-0.3.1 lib/boson/libraries/local_file_library.rb
boson-more-0.3.0 lib/boson/libraries/local_file_library.rb
boson-more-0.2.2 lib/boson/libraries/local_file_library.rb
boson-more-0.2.1 lib/boson/libraries/local_file_library.rb
boson-more-0.2.0 lib/boson/libraries/local_file_library.rb
boson-more-0.1.0 lib/boson/libraries/local_file_library.rb
boson-0.4.0 lib/boson/libraries/local_file_library.rb
bosonson-0.304.1 lib/boson/libraries/local_file_library.rb
boson-0.3.4 lib/boson/libraries/local_file_library.rb
boson-0.3.3 lib/boson/libraries/local_file_library.rb
boson-0.3.2 lib/boson/libraries/local_file_library.rb
boson-0.3.1 lib/boson/libraries/local_file_library.rb
boson-0.3.0 lib/boson/libraries/local_file_library.rb
boson-0.2.5 lib/boson/libraries/local_file_library.rb
boson-0.2.4 lib/boson/libraries/local_file_library.rb
boson-0.2.3 lib/boson/libraries/local_file_library.rb
boson-0.2.2 lib/boson/libraries/local_file_library.rb
boson-0.2.1 lib/boson/libraries/local_file_library.rb