Class: ReadingList::Configuration
- Inherits:
-
Object
- Object
- ReadingList::Configuration
- Defined in:
- lib/reading_list/models/configuration.rb
Instance Attribute Summary collapse
-
#book_file ⇒ Object
readonly
Returns the value of attribute book_file.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#output_dir ⇒ Object
readonly
Returns the value of attribute output_dir.
-
#theme ⇒ Object
readonly
Returns the value of attribute theme.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Configuration
constructor
A new instance of Configuration.
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_file ⇒ Object (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 |
#email ⇒ Object (readonly)
Returns the value of attribute email.
12 13 14 |
# File 'lib/reading_list/models/configuration.rb', line 12 def email @email end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/reading_list/models/configuration.rb', line 12 def name @name end |
#output_dir ⇒ Object (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 |
#theme ⇒ Object (readonly)
Returns the value of attribute theme.
12 13 14 |
# File 'lib/reading_list/models/configuration.rb', line 12 def theme @theme end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
12 13 14 |
# File 'lib/reading_list/models/configuration.rb', line 12 def website @website end |