# File lib/ravelry/printing.rb, line 66 def primary_source? @printing[:primary_source] end
class Ravelry::Printing
The information used to create `Ravelry::Printing` objects comes from {Ravelry::Pattern} objects.
You should not create `Printing` objects manually; they are all created–and owned–by a {Ravelry::Pattern}.
See {Ravelry::Pattern} for more information about `Pattern` objects.
Attributes
amazon_rating[R]
amazon_url[R]
list_price[R]
name[R]
pattern_count[R]
permalink[R]
price[R]
shelf_image_path[R]
url[R]
Public Class Methods
new(printing)
click to toggle source
# File lib/ravelry/printing.rb, line 13 def initialize(printing) @printing = printing @pattern_source = printing[:pattern_source] # Price of the printing source. # @price = @pattern_source[:price] # Permalink for printing. # @permalink = @pattern_source[:permalink] # Name of the printing. # @name = @pattern_source[:name] # Author of the printed source (if any). # @author = @pattern_source[:author] # URL of the printing. # @url = @pattern_source[:url] # Printing's rating on Amazon. # @amazon_rating = @pattern_source[:amazon_rating] # Number of patterns available in this printing. # @pattern_count = @pattern_source[:pattern_count] # Printing's Amazon URL. # @amazon_url = @pattern_source[:amazon_url] # Path to image, if any. # @shelf_image_path = @pattern_source[:shelf_image_path] # List price of the printing. # @list_price = @pattern_source[:list_price] end
Public Instance Methods
out_of_print?()
click to toggle source
Boolean value. Is this resource out of print?
# File lib/ravelry/printing.rb, line 60 def out_of_print? @pattern_source[:out_of_print] end
primary_source?()
click to toggle source
Boolean value. Is this the primary source of the pattern?