class MartialArts::FightingFocus

Attributes

name[R]

Public Class Methods

all() click to toggle source

def styles

@styles                styles method not needed, but fulfills fighting_focus has many styles relationship

end

# File lib/martial_arts/fighting_focus.rb, line 20
def self.all
  #contains fighting_focus in it's raw form; may contain 1, 2, or even 3 types of fighting_focus
  @@all
end
new(fighting_focus) click to toggle source
# File lib/martial_arts/fighting_focus.rb, line 6
def initialize(fighting_focus)
  @name = fighting_focus
  @styles = []
end

Public Instance Methods

add_style(style) click to toggle source
# File lib/martial_arts/fighting_focus.rb, line 11
def add_style(style)
  @styles << style
  style.fighting_focus = self
end