Class: MasterView::Tag
- Inherits:
-
Object
- Object
- MasterView::Tag
- Defined in:
- lib/masterview/parser.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#content ⇒ Object
Returns the value of attribute content.
-
#directives ⇒ Object
Returns the value of attribute directives.
-
#etag ⇒ Object
Returns the value of attribute etag.
-
#mode_type ⇒ Object
Returns the value of attribute mode_type.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#stag ⇒ Object
Returns the value of attribute stag.
-
#tag_name ⇒ Object
Returns the value of attribute tag_name.
Instance Method Summary collapse
-
#create_context(values = {}) ⇒ Object
creates a tag context using tag itself and mode type, also merge in any additional values passed in via values hash.
- #data ⇒ Object
-
#initialize(directives, tag_name, attributes, mode_type, parent) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(directives, tag_name, attributes, mode_type, parent) ⇒ Tag
Returns a new instance of Tag.
156 157 158 159 160 161 162 163 164 165 |
# File 'lib/masterview/parser.rb', line 156 def initialize(directives, tag_name, attributes, mode_type, parent) @tag_name = tag_name @attributes = attributes @mode_type = mode_type @directives = directives @stag = [] @content = [] @etag = [] @parent = parent end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def attributes @attributes end |
#content ⇒ Object
Returns the value of attribute content.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def content @content end |
#directives ⇒ Object
Returns the value of attribute directives.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def directives @directives end |
#etag ⇒ Object
Returns the value of attribute etag.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def etag @etag end |
#mode_type ⇒ Object
Returns the value of attribute mode_type.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def mode_type @mode_type end |
#parent ⇒ Object
Returns the value of attribute parent.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def parent @parent end |
#stag ⇒ Object
Returns the value of attribute stag.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def stag @stag end |
#tag_name ⇒ Object
Returns the value of attribute tag_name.
155 156 157 |
# File 'lib/masterview/parser.rb', line 155 def tag_name @tag_name end |
Instance Method Details
#create_context(values = {}) ⇒ Object
creates a tag context using tag itself and mode type, also merge in any additional values passed in via values hash
169 170 171 172 173 174 |
# File 'lib/masterview/parser.rb', line 169 def create_context( values = {} ) { :tag => self, :mode_type => @mode_type }.merge!(values) end |
#data ⇒ Object
176 177 178 |
# File 'lib/masterview/parser.rb', line 176 def data [] << @stag << @content << @etag end |