Class: NYTFiction::Book

Inherits:
Object
  • Object
show all
Defined in:
lib/nyt_fiction/book.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorObject

Returns the value of attribute author.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def author
  @author
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def description
  @description
end

#freshnessObject

Returns the value of attribute freshness.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def freshness
  @freshness
end

#publisherObject

Returns the value of attribute publisher.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def publisher
  @publisher
end

#titleObject

Returns the value of attribute title.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def title
  @title
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/nyt_fiction/book.rb', line 2

def url
  @url
end

Class Method Details

.allObject



6
7
8
# File 'lib/nyt_fiction/book.rb', line 6

def self.all
  @@all
end

Instance Method Details

#saveObject



10
11
12
# File 'lib/nyt_fiction/book.rb', line 10

def save
  @@all << self
end