module Ordinary::Composable
Public Instance Methods
<<(other)
click to toggle source
# File lib/ordinary/unit.rb, line 8 def <<(other) other >> self end
>>(other)
click to toggle source
# File lib/ordinary/unit.rb, line 3 def >>(other) Units.new([*self, *other]) end
Also aliased as: |
instance_id()
click to toggle source
# File lib/ordinary/unit.rb, line 25 def instance_id "#{self.class.name}:0x%014x" % (object_id << 1) end
owned?()
click to toggle source
# File lib/ordinary/unit.rb, line 21 def owned? @module and @name end
owned_by(mod, name)
click to toggle source
# File lib/ordinary/unit.rb, line 16 def owned_by(mod, name) @module = mod @name = name end
owner()
click to toggle source
# File lib/ordinary/unit.rb, line 12 def owner owned? ? "#{@module.name}##{@name}" : 'owner unknown' end