Class: Sunnyside::Query
- Inherits:
-
Object
- Object
- Sunnyside::Query
- Includes:
- Sunnyside
- Defined in:
- lib/sunnyside/query/query.rb
Constant Summary
Constants included from Sunnyside
DB, DRIVE, PRIVATE_CLIENTS, VERSION
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ Query
constructor
A new instance of Query.
- #ledger_file ⇒ Object
- #primary_id ⇒ Object
- #show_options ⇒ Object
Methods included from Sunnyside
access_ftp, add_denial_data, add_provider_to_ftp, add_providers, advanced_opts, cash_receipt, check_prompt, create_folders, create_tables, determine_browser, edi_parser, expiring_auth, ledger_file, parse_pdf, #payable_csv, private_clients, process_private, query, rails_server, #receivable_csv, run_mco_mltc, run_report
Constructor Details
#initialize(type) ⇒ Query
Returns a new instance of Query.
27 28 29 |
# File 'lib/sunnyside/query/query.rb', line 27 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/sunnyside/query/query.rb', line 24 def type @type end |
Instance Method Details
#ledger_file ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/sunnyside/query/query.rb', line 39 def ledger_file puts 'Type in post date (YYYY-MM-DD)' date = Date.parse(gets.chomp) if date.is_a?(Date) Invoice.where(post_date: date).all.each { |invoice| self.payable_csv(invoice, date) } end end |
#primary_id ⇒ Object
36 37 |
# File 'lib/sunnyside/query/query.rb', line 36 def primary_id end |
#show_options ⇒ Object
31 32 33 34 |
# File 'lib/sunnyside/query/query.rb', line 31 def if type.is_a?(Provider) end end |