Class: SObjectModel::Schema::Relations
- Inherits:
-
Object
- Object
- SObjectModel::Schema::Relations
- Includes:
- Enumerable
- Defined in:
- lib/sobject_model/schema.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #find(name) ⇒ Object
-
#initialize(relations) ⇒ Relations
constructor
A new instance of Relations.
- #names ⇒ Object
Constructor Details
Instance Method Details
#each(&block) ⇒ Object
234 235 236 |
# File 'lib/sobject_model/schema.rb', line 234 def each(&block) relations.each(&block) end |
#find(name) ⇒ Object
242 243 244 |
# File 'lib/sobject_model/schema.rb', line 242 def find(name) relations.find{|r| r.name == name.to_sym} end |
#names ⇒ Object
238 239 240 |
# File 'lib/sobject_model/schema.rb', line 238 def names map(&:name).sort end |