Class: GuideEmUp::Index

Inherits:
Struct
  • Object
show all
Defined in:
lib/guide-em-up/index.rb

Defined Under Namespace

Classes: FileEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_dirObject

Returns the value of attribute current_dir

Returns:

  • (Object)

    the current value of current_dir



2
3
4
# File 'lib/guide-em-up/index.rb', line 2

def current_dir
  @current_dir
end

#data_dirObject

Returns the value of attribute data_dir

Returns:

  • (Object)

    the current value of data_dir



2
3
4
# File 'lib/guide-em-up/index.rb', line 2

def data_dir
  @data_dir
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



2
3
4
# File 'lib/guide-em-up/index.rb', line 2

def root
  @root
end

#themesObject

Returns the value of attribute themes

Returns:

  • (Object)

    the current value of themes



2
3
4
# File 'lib/guide-em-up/index.rb', line 2

def themes
  @themes
end

Instance Method Details

#htmlObject



5
6
7
8
9
# File 'lib/guide-em-up/index.rb', line 5

def html
  file = File.join(data_dir, "/browser.erb")
  tmpl = File.read(file)
  Erubis::Eruby.new(tmpl).result(to_hash)
end