Module: Libertree::Model::IsRemoteOrLocal
Instance Method Summary collapse
Instance Method Details
#forests ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/libertree/model/is-remote-or-local.rb', line 20 def forests if self.remote? self.server.forests else Libertree::Model::Forest.all_local_is_member end end |
#local? ⇒ Boolean
12 13 14 |
# File 'lib/libertree/model/is-remote-or-local.rb', line 12 def local? ! remote_id end |
#public_id ⇒ Object
4 5 6 |
# File 'lib/libertree/model/is-remote-or-local.rb', line 4 def public_id self.remote_id || self.id end |
#remote? ⇒ Boolean
8 9 10 |
# File 'lib/libertree/model/is-remote-or-local.rb', line 8 def remote? !! remote_id end |
#server ⇒ Object
16 17 18 |
# File 'lib/libertree/model/is-remote-or-local.rb', line 16 def server @server ||= self.member.server end |