Class: GoogleSheetsAppendroid::AppendRows
- Inherits:
-
Object
- Object
- GoogleSheetsAppendroid::AppendRows
- Defined in:
- lib/google_sheets_appendroid/append_rows.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(rows, range) ⇒ AppendRows
constructor
A new instance of AppendRows.
- #punch_it ⇒ Object
Constructor Details
#initialize(rows, range) ⇒ AppendRows
Returns a new instance of AppendRows.
8 9 10 11 12 |
# File 'lib/google_sheets_appendroid/append_rows.rb', line 8 def initialize(rows, range) @access_token = Authorize.get_access_token @rows = rows @range = range end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
6 7 8 |
# File 'lib/google_sheets_appendroid/append_rows.rb', line 6 def access_token @access_token end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
6 7 8 |
# File 'lib/google_sheets_appendroid/append_rows.rb', line 6 def range @range end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
6 7 8 |
# File 'lib/google_sheets_appendroid/append_rows.rb', line 6 def rows @rows end |
Instance Method Details
#punch_it ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/google_sheets_appendroid/append_rows.rb', line 14 def punch_it req = create_request Net::HTTP.start( uri.hostname, uri.port, use_ssl: uri.scheme == 'https' ) { |http| http.request(req) } end |