Class: TheCity::Account
Overview
The City church account
Instance Attribute Summary collapse
-
#id ⇒ Integer
readonly
The id associated with the church account.
-
#name ⇒ String
readonly
The name of the church, ‘Grace Church’.
-
#subdomain ⇒ String
readonly
The subdomain used to access this account, subdomain.onthecity.org.
Attributes inherited from Base
Instance Method Summary collapse
-
#campuses ⇒ Array<TheCity::Group>
Return campuses that belong to a multisite church.
-
#initialize(attrs = {}, options = {}) ⇒ Account
constructor
A new instance of Account.
- #label_for(thecity_primitive) ⇒ Object
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, from_response, #memoize, object_attr_reader, uri_attr_reader
Constructor Details
#initialize(attrs = {}, options = {}) ⇒ Account
Returns a new instance of Account.
15 16 17 18 |
# File 'lib/the_city/account.rb', line 15 def initialize(attrs={}, ={}) super(attrs,) @campuses = Array(attrs.delete(:campuses)).map {|g| TheCity::Group.new(g,)} end |
Instance Attribute Details
#id ⇒ Integer (readonly)
Returns The id associated with the church account.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/the_city/account.rb', line 11 class Account < TheCity::Base attr_reader :name, :id, :subdomain object_attr_reader :Terminology, :terminology def initialize(attrs={}, ={}) super(attrs,) @campuses = Array(attrs.delete(:campuses)).map {|g| TheCity::Group.new(g,)} end # Return campuses that belong to a multisite church # # @return [Array<TheCity::Group>] def campuses @campuses end def label_for(thecity_primitive) terminology.send(thecity_primitive.downcase.to_sym) rescue nil end end |
#name ⇒ String (readonly)
Returns The name of the church, ‘Grace Church’.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/the_city/account.rb', line 11 class Account < TheCity::Base attr_reader :name, :id, :subdomain object_attr_reader :Terminology, :terminology def initialize(attrs={}, ={}) super(attrs,) @campuses = Array(attrs.delete(:campuses)).map {|g| TheCity::Group.new(g,)} end # Return campuses that belong to a multisite church # # @return [Array<TheCity::Group>] def campuses @campuses end def label_for(thecity_primitive) terminology.send(thecity_primitive.downcase.to_sym) rescue nil end end |
#subdomain ⇒ String (readonly)
Returns The subdomain used to access this account, subdomain.onthecity.org.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/the_city/account.rb', line 11 class Account < TheCity::Base attr_reader :name, :id, :subdomain object_attr_reader :Terminology, :terminology def initialize(attrs={}, ={}) super(attrs,) @campuses = Array(attrs.delete(:campuses)).map {|g| TheCity::Group.new(g,)} end # Return campuses that belong to a multisite church # # @return [Array<TheCity::Group>] def campuses @campuses end def label_for(thecity_primitive) terminology.send(thecity_primitive.downcase.to_sym) rescue nil end end |
Instance Method Details
#campuses ⇒ Array<TheCity::Group>
Return campuses that belong to a multisite church
23 24 25 |
# File 'lib/the_city/account.rb', line 23 def campuses @campuses end |
#label_for(thecity_primitive) ⇒ Object
27 28 29 |
# File 'lib/the_city/account.rb', line 27 def label_for(thecity_primitive) terminology.send(thecity_primitive.downcase.to_sym) rescue nil end |