Class: Mo2tex::Pic::Location
- Inherits:
-
Object
- Object
- Mo2tex::Pic::Location
- Defined in:
- lib/mo2tex/pic.rb
Instance Attribute Summary collapse
-
#pfx ⇒ Object
readonly
Returns the value of attribute pfx.
-
#sfx ⇒ Object
readonly
Returns the value of attribute sfx.
Instance Method Summary collapse
-
#initialize(p, s) ⇒ Location
constructor
A new instance of Location.
- #tag(n) ⇒ Object
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
#pfx ⇒ Object (readonly)
Returns the value of attribute pfx.
66 67 68 |
# File 'lib/mo2tex/pic.rb', line 66 def pfx @pfx end |
#sfx ⇒ Object (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 |