class Curly::Parser::Component

Attributes

attributes[R]
contexts[R]
identifier[R]
name[R]

Public Class Methods

new(name, identifier = nil, attributes = {}, contexts = []) click to toggle source
# File lib/curly/parser.rb, line 8
def initialize(name, identifier = nil, attributes = {}, contexts = [])
  @name, @identifier, @attributes, @contexts = name, identifier, attributes, contexts
end

Public Instance Methods

==(other) click to toggle source
# File lib/curly/parser.rb, line 16
def ==(other)
  other.name == name &&
    other.identifier == identifier &&
    other.attributes == attributes &&
    other.contexts == contexts
end
to_s() click to toggle source
# File lib/curly/parser.rb, line 12
def to_s
  contexts.map {|c| c + ":" }.join << [name, identifier].compact.join(".")
end
type() click to toggle source
# File lib/curly/parser.rb, line 23
def type
  :component
end