Class: Ruar::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/ruar/index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dirObject (readonly)

Returns the value of attribute dir.



5
6
7
# File 'lib/ruar/index.rb', line 5

def dir
  @dir
end

#indexObject (readonly)

Returns the value of attribute index.



5
6
7
# File 'lib/ruar/index.rb', line 5

def index
  @index
end

#source_infoObject (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_indexObject



14
15
16
# File 'lib/ruar/index.rb', line 14

def json_index
  @index.to_json
end