Class: ReadingList::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/reading_list/models/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Configuration

Returns a new instance of Configuration.



3
4
5
6
7
8
9
10
# File 'lib/reading_list/models/configuration.rb', line 3

def initialize(hash)
  @name = hash['name']
  @email = hash['email']
  @website = hash['website']
  @book_file = hash['book_file']
  @output_dir = hash.dig('output', 'dir')
  @theme = hash.dig('output', 'theme')
end

Instance Attribute Details

#book_fileObject (readonly)

Returns the value of attribute book_file.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def book_file
  @book_file
end

#emailObject (readonly)

Returns the value of attribute email.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def email
  @email
end

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def name
  @name
end

#output_dirObject (readonly)

Returns the value of attribute output_dir.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def output_dir
  @output_dir
end

#themeObject (readonly)

Returns the value of attribute theme.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def theme
  @theme
end

#websiteObject (readonly)

Returns the value of attribute website.



12
13
14
# File 'lib/reading_list/models/configuration.rb', line 12

def website
  @website
end