class Rugged::Repository::Attributes
Constants
- LOAD_PRIORITIES
Public Class Methods
Source
# File lib/rugged/attributes.rb, line 27 def initialize(repository, path, options = {}) @repository = repository @path = path @load_flags = Attributes.parse_opts(options) end
Source
# File lib/rugged/attributes.rb, line 21 def self.parse_opts(opt) flags = LOAD_PRIORITIES[opt[:priority]] || 0 flags |= 4 if opt[:skip_system] flags end
Public Instance Methods
Source
# File lib/rugged/attributes.rb, line 33 def [](attribute) @repository.fetch_attributes(@path, attribute, @load_flags) end
Source
# File lib/rugged/attributes.rb, line 41 def each(&block) to_h.each(&block) end
Source
# File lib/rugged/attributes.rb, line 37 def to_h @hash ||= @repository.fetch_attributes(@path, nil, @load_flags) end