Class: Xpub::BookManager

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/xpub/dsl/book.rb

Instance Method Summary collapse

Constructor Details

#initializeBookManager

Returns a new instance of BookManager.



102
103
104
# File 'lib/xpub/dsl/book.rb', line 102

def initialize
  @books = []
end

Instance Method Details

#add(b) ⇒ Object



106
107
108
# File 'lib/xpub/dsl/book.rb', line 106

def add(b)
  @books << b
end

#build(option) ⇒ Object



110
111
112
113
114
# File 'lib/xpub/dsl/book.rb', line 110

def build(option)
  @books.each do |book|
    book.build option if !option[:book] || option[:book] == book.name
  end
end

#check(option) ⇒ Object



116
117
118
119
120
# File 'lib/xpub/dsl/book.rb', line 116

def check(option)
  @books.each do |book|
    book.check option if !option[:book] || option[:book] == book.name
  end
end