Class: AspireBudget::Worksheets::WorksheetBase Abstract
- Inherits:
-
Object
- Object
- AspireBudget::Worksheets::WorksheetBase
- Defined in:
- lib/aspire_budget/worksheets/worksheet_base.rb
Overview
This class is abstract.
Subclass and reimplement ws_title to implement a custom worksheet
Direct Known Subclasses
Class Method Summary collapse
-
.instance ⇒ Object
An instance of the current object.
Instance Method Summary collapse
-
#dirty? ⇒ Boolean
Whether the worksheet has unsaved changes.
-
#initialize(session: nil, spreadsheet_key: nil) ⇒ Object
constructor
A new instance of the calling class configured with an agent.
Constructor Details
#initialize(session: nil, spreadsheet_key: nil) ⇒ Object
Returns a new instance of the calling class configured with an agent.
35 36 37 38 39 |
# File 'lib/aspire_budget/worksheets/worksheet_base.rb', line 35 def initialize(session: nil, spreadsheet_key: nil) @session = session @spreadsheet_key = spreadsheet_key @agent = AspireBudget.configuration.agent(@session, @spreadsheet_key) end |
Class Method Details
.instance ⇒ Object
Returns an instance of the current object.
12 13 14 |
# File 'lib/aspire_budget/worksheets/worksheet_base.rb', line 12 def instance Thread.current[to_s] ||= new end |
Instance Method Details
#dirty? ⇒ Boolean
Returns Whether the worksheet has unsaved changes.
42 43 44 |
# File 'lib/aspire_budget/worksheets/worksheet_base.rb', line 42 def dirty? ws.dirty? end |