Class: Kaiseki::BasicTag
- Inherits:
-
PackageParser
- Object
- BasicParser
- PackageParser
- Kaiseki::BasicTag
- Defined in:
- lib/tag_basic.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from BasicParser
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(expected, name) ⇒ BasicTag
constructor
A new instance of BasicTag.
Methods inherited from PackageParser
Methods inherited from BasicParser
Methods included from Parseable
#&, #action, #and?, #cast, #filter, #list, #merge, #not!, #one_or_more, #optional, #override, #parse, #predicate?, #protect, #repeat, #set, #skip, #tag_error, #tag_result, #to_parseable, #validate, #zero_or_more, #|
Constructor Details
#initialize(expected, name) ⇒ BasicTag
Returns a new instance of BasicTag.
5 6 7 8 |
# File 'lib/tag_basic.rb', line 5 def initialize expected, name super expected @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/tag_basic.rb', line 3 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
10 11 12 |
# File 'lib/tag_basic.rb', line 10 def eql? other other.is_a?(self.class) and other.expected == @expected and other.name == @name end |