Class: CKAN::Group
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id) ⇒ Group
constructor
A new instance of Group.
- #packages ⇒ Object
Constructor Details
#initialize(id) ⇒ Group
Returns a new instance of Group.
8 9 10 11 |
# File 'lib/ckan/group.rb', line 8 def initialize(id) @name = id @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/ckan/group.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/ckan/group.rb', line 5 def name @name end |
Class Method Details
.find ⇒ Object
13 14 15 |
# File 'lib/ckan/group.rb', line 13 def self.find @all_groups ||= read_remote_json_data(self.site).map{|id| Group.get(id)} end |
Instance Method Details
#packages ⇒ Object
20 21 22 |
# File 'lib/ckan/group.rb', line 20 def packages @packages ||= self.api_packages.map{|p| Package.send(:get,p)} end |