Class: Ruar::Index
- Inherits:
-
Object
- Object
- Ruar::Index
- Defined in:
- lib/ruar/index.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#source_info ⇒ Object
readonly
Returns the value of attribute source_info.
Instance Method Summary collapse
-
#initialize(dir = '.') ⇒ Index
constructor
A new instance of Index.
- #json_index ⇒ Object
Constructor Details
#initialize(dir = '.') ⇒ Index
Returns a new instance of Index.
7 8 9 10 11 12 |
# File 'lib/ruar/index.rb', line 7 def initialize(dir = '.') @dir = dir generate(dir) do |file| yield(file) if block_given? end end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
5 6 7 |
# File 'lib/ruar/index.rb', line 5 def dir @dir end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
5 6 7 |
# File 'lib/ruar/index.rb', line 5 def index @index end |
#source_info ⇒ Object (readonly)
Returns the value of attribute source_info.
5 6 7 |
# File 'lib/ruar/index.rb', line 5 def source_info @source_info end |
Instance Method Details
#json_index ⇒ Object
14 15 16 |
# File 'lib/ruar/index.rb', line 14 def json_index @index.to_json end |