Class: CoopAl::StateReporter
- Inherits:
-
Object
- Object
- CoopAl::StateReporter
- Defined in:
- lib/coop_al/state_reporter.rb
Overview
StateReporter
Instance Method Summary collapse
-
#initialize(state, library, options = {}) ⇒ StateReporter
constructor
A new instance of StateReporter.
- #report(s) ⇒ Object
Constructor Details
#initialize(state, library, options = {}) ⇒ StateReporter
Returns a new instance of StateReporter.
6 7 8 9 10 11 12 13 |
# File 'lib/coop_al/state_reporter.rb', line 6 def initialize(state, library, = {}) @state = state @library = library @party_size = .key?(:party_size) ? [:party_size] : 6 @show_xp = .key?(:show_xp) ? [:show_xp] : true @show_loot = .key?(:show_loot) ? [:show_loot] : true @show_paths = .key?(:show_paths) ? [:show_paths] : true end |
Instance Method Details
#report(s) ⇒ Object
15 16 17 18 19 |
# File 'lib/coop_al/state_reporter.rb', line 15 def report(s) report_xp(s) if @show_xp report_loot(s) if @show_loot report_paths(s) if @show_paths end |