Class: KnittingPatterns::Pattern

Inherits:
Object
  • Object
show all
Defined in:
lib/knitting_patterns/pattern.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



2
3
4
# File 'lib/knitting_patterns/pattern.rb', line 2

def category
  @category
end

#titleObject

Returns the value of attribute title.



2
3
4
# File 'lib/knitting_patterns/pattern.rb', line 2

def title
  @title
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/knitting_patterns/pattern.rb', line 2

def url
  @url
end

Class Method Details

.allObject



5
6
7
# File 'lib/knitting_patterns/pattern.rb', line 5

def self.all
  @@all
end

Instance Method Details

#saveObject



9
10
11
# File 'lib/knitting_patterns/pattern.rb', line 9

def save
  @@all << self
end