Class: SBF::Client::FundraisingPage
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- SBF::Client::FundraisingPage
- Defined in:
- lib/stbaldricks/entities/lib/fundraising_page.rb
Direct Known Subclasses
Constant Summary collapse
- HTTP_REGEX =
%r{^https?://}.freeze
Constants inherited from BaseEntity
Instance Attribute Summary collapse
-
#custom_url_segment ⇒ Object
Returns the value of attribute custom_url_segment.
-
#is_enabled ⇒ Object
Returns the value of attribute is_enabled.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from BaseEntity
Instance Method Summary collapse
Methods inherited from BaseEntity
allow_instantiation?, attr_accessor, attr_reader, attr_writer, collection_attributes, defined_attributes, #destroyed?, #dirty_data, entity_attr_accessor, entity_attr_reader, entity_attr_writer, entity_attributes, entity_collection_attr_accessor, entity_collection_attr_reader, entity_collection_attr_writer, #error, inherited, #initialize, #keys_hash, #model_name, multitype_attr_accessor, multitype_attr_reader, multitype_attr_writer, multitype_collection_attr_accessor, multitype_collection_attr_reader, multitype_collection_attr_writer, #not_provided_attributes, optional_attributes, #persisted?, #reload!, #reload_recursive, #rollback!, #to_hash, #to_json, #to_partial
Methods included from EntityResponseConcern
#add_errors, #data, #error?, #errors?, #errors_http_code=, #http_code, #success?
Constructor Details
This class inherits a constructor from SBF::Client::BaseEntity
Instance Attribute Details
#custom_url_segment ⇒ Object
Returns the value of attribute custom_url_segment.
7 8 9 |
# File 'lib/stbaldricks/entities/lib/fundraising_page.rb', line 7 def custom_url_segment @custom_url_segment end |
#is_enabled ⇒ Object
Returns the value of attribute is_enabled.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/fundraising_page.rb', line 6 def is_enabled @is_enabled end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/stbaldricks/entities/lib/fundraising_page.rb', line 8 def url @url end |
Instance Method Details
#url_with_scheme ⇒ Object
12 13 14 15 |
# File 'lib/stbaldricks/entities/lib/fundraising_page.rb', line 12 def url_with_scheme url.insert(0, 'https:') unless url.empty? || HTTP_REGEX.match(url) url end |