Sha256: 0b6df7f3bccb3c7b9378e1999fe7df8458cc5fa5982754f0a96ba5a494ce86b4
Contents?: true
Size: 618 Bytes
Versions: 5
Compression:
Stored size: 618 Bytes
Contents
module Joint class AttachmentProxy def initialize(instance, name) @instance, @name = instance, name end def id @instance.send("#{@name}_id") end def name @instance.send("#{@name}_name") end def size @instance.send("#{@name}_size") end def type @instance.send("#{@name}_type") end def nil? !@instance.send("#{@name}?") end alias_method :blank?, :nil? def grid_io @grid_io ||= @instance.grid.get(id) end def method_missing(method, *args, &block) grid_io.send(method, *args, &block) end end end
Version data entries
5 entries across 5 versions & 2 rubygems