Class: Grizzled::String::Template::Variable
- Inherits:
-
Object
- Object
- Grizzled::String::Template::Variable
- Defined in:
- lib/grizzled/string/template.rb
Overview
What a parsed variable looks like.
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#iend ⇒ Object
readonly
Returns the value of attribute iend.
-
#istart ⇒ Object
readonly
Returns the value of attribute istart.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(istart, iend, name, default = nil) ⇒ Variable
constructor
A new instance of Variable.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(istart, iend, name, default = nil) ⇒ Variable
Returns a new instance of Variable.
67 68 69 70 71 72 |
# File 'lib/grizzled/string/template.rb', line 67 def initialize(istart, iend, name, default=nil) @istart = istart @iend = iend @name = name @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
65 66 67 |
# File 'lib/grizzled/string/template.rb', line 65 def default @default end |
#iend ⇒ Object (readonly)
Returns the value of attribute iend.
65 66 67 |
# File 'lib/grizzled/string/template.rb', line 65 def iend @iend end |
#istart ⇒ Object (readonly)
Returns the value of attribute istart.
65 66 67 |
# File 'lib/grizzled/string/template.rb', line 65 def istart @istart end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
65 66 67 |
# File 'lib/grizzled/string/template.rb', line 65 def name @name end |
Instance Method Details
#inspect ⇒ Object
74 |
# File 'lib/grizzled/string/template.rb', line 74 alias :inspect :to_s |
#to_s ⇒ Object
75 76 77 |
# File 'lib/grizzled/string/template.rb', line 75 def to_s "#{name}" end |