Class: RubyRedtail::TagGroup
- Inherits:
-
Object
- Object
- RubyRedtail::TagGroup
- Defined in:
- lib/ruby-redtail/tag_group.rb,
lib/ruby-redtail/tag_group/contacts.rb
Defined Under Namespace
Classes: Contacts
Instance Method Summary collapse
- #contacts ⇒ Object
-
#initialize(tag_group = {}, api_hash) ⇒ TagGroup
constructor
A new instance of TagGroup.
Constructor Details
#initialize(tag_group = {}, api_hash) ⇒ TagGroup
Returns a new instance of TagGroup.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby-redtail/tag_group.rb', line 6 def initialize(tag_group = {},api_hash) @api_hash = api_hash raise ArgumentError unless tag_group['RecID'] @id = tag_group['RecID'] raise ArgumentError if tag_group.class != Hash tag_group.each do |key, value| key = key.underscore self.class.send :attr_accessor, key instance_variable_set "@#{key}", value end end |
Instance Method Details
#contacts ⇒ Object
20 21 22 |
# File 'lib/ruby-redtail/tag_group.rb', line 20 def contacts RubyRedtail::TagGroup::Contacts.new self.api_hash end |