Class: ClassSource::Index
- Inherits:
-
Object
- Object
- ClassSource::Index
- Defined in:
- lib/class_source/index.rb
Instance Method Summary collapse
- #==(value) ⇒ Object
- #all(options = {}) ⇒ Object
- #class_methods ⇒ Object
- #files ⇒ Object
-
#initialize(target_class, options = {}) ⇒ Index
constructor
A new instance of Index.
- #locations(options = {}) ⇒ Object
- #locator ⇒ Object
- #methods ⇒ Object
- #to_s(options = {}) ⇒ Object
Constructor Details
#initialize(target_class, options = {}) ⇒ Index
Returns a new instance of Index.
3 4 5 6 |
# File 'lib/class_source/index.rb', line 3 def initialize(target_class, = {}) @target_class = target_class @options = end |
Instance Method Details
#==(value) ⇒ Object
12 13 14 |
# File 'lib/class_source/index.rb', line 12 def ==(value) to_s == value end |
#all(options = {}) ⇒ Object
16 17 18 |
# File 'lib/class_source/index.rb', line 16 def all(={}) @collator ||= Collator.new(@target_class, self).to_hash() end |
#class_methods ⇒ Object
28 29 30 |
# File 'lib/class_source/index.rb', line 28 def class_methods methods.klass end |
#files ⇒ Object
36 37 38 |
# File 'lib/class_source/index.rb', line 36 def files locator.files end |
#locations(options = {}) ⇒ Object
20 21 22 |
# File 'lib/class_source/index.rb', line 20 def locations(={}) locator.to_a end |
#locator ⇒ Object
32 33 34 |
# File 'lib/class_source/index.rb', line 32 def locator @locator ||= Locator.new(@target_class, @options) end |
#methods ⇒ Object
24 25 26 |
# File 'lib/class_source/index.rb', line 24 def methods @method_details ||= MethodIndex.new(@target_class) end |
#to_s(options = {}) ⇒ Object
8 9 10 |
# File 'lib/class_source/index.rb', line 8 def to_s(={}) all().values.join("") end |