Class: MoreappAPI::Folder
- Inherits:
-
Object
- Object
- MoreappAPI::Folder
- Defined in:
- lib/moreapp_api/folder.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
Instance Method Summary collapse
- #forms ⇒ Object
-
#initialize(customer, data) ⇒ Folder
constructor
A new instance of Folder.
Constructor Details
#initialize(customer, data) ⇒ Folder
Returns a new instance of Folder.
8 9 10 11 12 13 14 15 |
# File 'lib/moreapp_api/folder.rb', line 8 def initialize(customer, data) @moreapp_api = customer.moreapp_api @customer = customer @id = data["applicationId"] @name = data["name"] @form_ids = data["forms"] @raw_data = data end |
Instance Attribute Details
#customer ⇒ Object
Returns the value of attribute customer.
6 7 8 |
# File 'lib/moreapp_api/folder.rb', line 6 def customer @customer end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/moreapp_api/folder.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/moreapp_api/folder.rb', line 6 def name @name end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
6 7 8 |
# File 'lib/moreapp_api/folder.rb', line 6 def raw_data @raw_data end |
Instance Method Details
#forms ⇒ Object
17 18 19 20 21 |
# File 'lib/moreapp_api/folder.rb', line 17 def forms @form_ids.map do |long_form_id| MoreappAPI::Form.create_in_folder(self, long_form_id) end end |