Module: Finder

Defined in:
lib/finder.rb,
lib/finder/gem.rb,
lib/finder/base.rb,
lib/finder/find.rb,
lib/finder/roll.rb,
lib/finder/site.rb,
lib/finder/index.rb

Overview

TODO: Import is optional for the time bing. require ‘finder/import’

Defined Under Namespace

Modules: Find, Findable

Instance Method Summary collapse

Instance Method Details

#const_missing(name) ⇒ Object

Access to project metadata via constants.

Examples:

Finder::VERSION  #=> '0.2.0'


20
21
22
# File 'lib/finder/index.rb', line 20

def const_missing(name)
  index[name.to_s.downcase] || super(name)
end

#indexObject

Cached access to project metadata.



6
7
8
9
10
11
12
# File 'lib/finder/index.rb', line 6

def index
  @index ||=(
    require 'yaml'
    file = File.expand_path('../finder.yml', File.dirname(__FILE__))
    YAML.load_file(file)
  )
end