Class: Active::Services::IActivity
- Inherits:
-
Object
- Object
- Active::Services::IActivity
- Defined in:
- lib/services/IActivity.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#asset_id ⇒ Object
Returns the value of attribute asset_id.
-
#asset_type_id ⇒ Object
Returns the value of attribute asset_type_id.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#category ⇒ Object
Returns the value of attribute category.
-
#data ⇒ Object
Returns the value of attribute data.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#online_registration ⇒ Object
Returns the value of attribute online_registration.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def address @address end |
#asset_id ⇒ Object
Returns the value of attribute asset_id.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def asset_id @asset_id end |
#asset_type_id ⇒ Object
Returns the value of attribute asset_type_id.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def asset_type_id @asset_type_id end |
#categories ⇒ Object
Returns the value of attribute categories.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def categories @categories end |
#category ⇒ Object
Returns the value of attribute category.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def category @category end |
#data ⇒ Object
Returns the value of attribute data.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def data @data end |
#desc ⇒ Object
Returns the value of attribute desc.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def desc @desc end |
#end_date ⇒ Object
Returns the value of attribute end_date.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def end_date @end_date end |
#end_time ⇒ Object
Returns the value of attribute end_time.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def end_time @end_time end |
#online_registration ⇒ Object
Returns the value of attribute online_registration.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def online_registration @online_registration end |
#start_date ⇒ Object
Returns the value of attribute start_date.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def start_date @start_date end |
#start_time ⇒ Object
Returns the value of attribute start_time.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def start_time @start_time end |
#title ⇒ Object
Returns the value of attribute title.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/services/IActivity.rb', line 10 def url @url end |
Instance Method Details
#source ⇒ Object
31 32 33 |
# File 'lib/services/IActivity.rb', line 31 def source raise StandardError, "You must override this method" end |
#validated_address(address) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/services/IActivity.rb', line 15 def validated_address(address) #ensure a hash with the proper keys returnAddress = HashWithIndifferentAccess.new({ :name =>"", :address => "", :city => "", :state => "",:zip => "", :lat => "", :lng => "", :country => ""}) returnAddress.merge!(address) # validations returnAddress["zip"] = Validators.valid_zip(returnAddress["zip"]) returnAddress["state"] = Validators.valid_state(returnAddress["state"]) # ensure no nil returnAddress.keys.each do |key| returnAddress[key] = "" if returnAddress[key].nil? end returnAddress end |