Class: Mo2tex::Pic::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/mo2tex/pic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(p, s) ⇒ Location

Returns a new instance of Location.



68
69
70
71
# File 'lib/mo2tex/pic.rb', line 68

def initialize(p, s)
  @pfx = p
  @sfx = s
end

Instance Attribute Details

#pfxObject (readonly)

Returns the value of attribute pfx.



66
67
68
# File 'lib/mo2tex/pic.rb', line 66

def pfx
  @pfx
end

#sfxObject (readonly)

Returns the value of attribute sfx.



66
67
68
# File 'lib/mo2tex/pic.rb', line 66

def sfx
  @sfx
end

Instance Method Details

#tag(n) ⇒ Object



73
74
75
# File 'lib/mo2tex/pic.rb', line 73

def tag(n) 
  return sprintf("%s%d.%s", self.pfx, n, self.sfx)
end