Class: Subledger::Domain::CompletedReportRendering
- Inherits:
-
ReportRendering
- Object
- ReportRendering
- Subledger::Domain::CompletedReportRendering
- Defined in:
- lib/subledger/domain/report_rendering.rb
Defined Under Namespace
Classes: Entity
Instance Attribute Summary collapse
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#completed_at ⇒ Object
readonly
Returns the value of attribute completed_at.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Attributes inherited from ReportRendering
#balanced_accounts, #book, #effective_at, #rendered_at, #report, #total_accounts
Attributes included from Roles::Storable
Attributes included from Roles::Identifiable
Attributes included from Roles::DescribableReportRendering
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ReportRendering
active_klass, building_klass, completed_klass, #initialize, post_keys, root_klass
Methods included from Roles::Restable
#patch_hash, #post_hash, #serializable_hash
Methods included from Roles::Collectable
Methods included from Roles::Readable
Methods included from Roles::Creatable
Methods included from Roles::Storable
Methods included from Roles::DescribableReportRendering
Methods included from Roles::Attributable
Methods included from Subledger::Domain
#==, #collection_name, #entity_name, included, #to_s
Constructor Details
This class inherits a constructor from Subledger::Domain::ReportRendering
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
164 165 166 |
# File 'lib/subledger/domain/report_rendering.rb', line 164 def balance @balance end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
164 165 166 |
# File 'lib/subledger/domain/report_rendering.rb', line 164 def categories @categories end |
#completed_at ⇒ Object (readonly)
Returns the value of attribute completed_at.
164 165 166 |
# File 'lib/subledger/domain/report_rendering.rb', line 164 def completed_at @completed_at end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
164 165 166 |
# File 'lib/subledger/domain/report_rendering.rb', line 164 def warnings @warnings end |
Class Method Details
.sub_klasses ⇒ Object
166 167 168 |
# File 'lib/subledger/domain/report_rendering.rb', line 166 def self.sub_klasses [ completed_klass ] end |
Instance Method Details
#progress ⇒ Object
170 171 172 |
# File 'lib/subledger/domain/report_rendering.rb', line 170 def progress 100 end |
#to_json ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/subledger/domain/report_rendering.rb', line 174 def to_json @json ||= if location[0..4] == 's3://' ExceptionHandler.new( :name => 'completed_report_rendering to_json' ).with_retry do s3_bucket.objects[id].read end elsif location[0..6] == 'file://' File.open( location[7..-1], 'r' ).read else raise ReportRenderingError, "unknown URL scheme: #{location}" end end |