Class: Parser::Defs
- Inherits:
-
Object
- Object
- Parser::Defs
- Defined in:
- lib/amy/parser/defs.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #add_prop(key, text) ⇒ Object
- #empty? ⇒ Boolean
- #get_props ⇒ Object
-
#initialize ⇒ Defs
constructor
A new instance of Defs.
Constructor Details
#initialize ⇒ Defs
Returns a new instance of Defs.
6 7 8 9 10 |
# File 'lib/amy/parser/defs.rb', line 6 def initialize @props = {} @method = "" @url = "" end |
Instance Attribute Details
#method ⇒ Object
Returns the value of attribute method.
4 5 6 |
# File 'lib/amy/parser/defs.rb', line 4 def method @method end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/amy/parser/defs.rb', line 4 def url @url end |
Instance Method Details
#add_prop(key, text) ⇒ Object
12 13 14 |
# File 'lib/amy/parser/defs.rb', line 12 def add_prop(key, text) @props[key] = text end |
#empty? ⇒ Boolean
20 21 22 |
# File 'lib/amy/parser/defs.rb', line 20 def empty? @props.empty? end |
#get_props ⇒ Object
16 17 18 |
# File 'lib/amy/parser/defs.rb', line 16 def get_props @props end |