Class: Ak::Registry
- Inherits:
-
Object
- Object
- Ak::Registry
- Defined in:
- lib/ak.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
- #find_by(type, value) ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #load(path, **options) ⇒ Object
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
11 12 13 |
# File 'lib/ak.rb', line 11 def initialize @files = [] end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
9 10 11 |
# File 'lib/ak.rb', line 9 def files @files end |
Instance Method Details
#find_by(type, value) ⇒ Object
24 25 26 |
# File 'lib/ak.rb', line 24 def find_by(type, value) files.find { |file| file.send(type) == value } end |