Class: XDry::OMethod
- Inherits:
-
Object
- Object
- XDry::OMethod
- Defined in:
- lib/xdry/parsing/model.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#impl ⇒ Object
readonly
Returns the value of attribute impl.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
- #<<(child) ⇒ Object
- #add_method_header!(method_header) ⇒ Object
- #add_method_impl!(method_impl) ⇒ Object
- #has_header? ⇒ Boolean
- #has_impl? ⇒ Boolean
- #header_or_impl ⇒ Object
-
#initialize(selector) ⇒ OMethod
constructor
A new instance of OMethod.
- #ret_type ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(selector) ⇒ OMethod
Returns a new instance of OMethod.
235 236 237 |
# File 'lib/xdry/parsing/model.rb', line 235 def initialize selector @selector = selector end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
233 234 235 |
# File 'lib/xdry/parsing/model.rb', line 233 def header @header end |
#impl ⇒ Object (readonly)
Returns the value of attribute impl.
233 234 235 |
# File 'lib/xdry/parsing/model.rb', line 233 def impl @impl end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
233 234 235 |
# File 'lib/xdry/parsing/model.rb', line 233 def selector @selector end |
Instance Method Details
#<<(child) ⇒ Object
259 260 |
# File 'lib/xdry/parsing/model.rb', line 259 def << child end |
#add_method_header!(method_header) ⇒ Object
239 240 241 |
# File 'lib/xdry/parsing/model.rb', line 239 def add_method_header! method_header @header = method_header end |
#add_method_impl!(method_impl) ⇒ Object
243 244 245 |
# File 'lib/xdry/parsing/model.rb', line 243 def add_method_impl! method_impl @impl = method_impl.bind(self) end |
#has_header? ⇒ Boolean
247 248 249 |
# File 'lib/xdry/parsing/model.rb', line 247 def has_header? not @header.nil? end |
#has_impl? ⇒ Boolean
251 252 253 |
# File 'lib/xdry/parsing/model.rb', line 251 def has_impl? not @impl.nil? end |
#header_or_impl ⇒ Object
266 267 268 |
# File 'lib/xdry/parsing/model.rb', line 266 def header_or_impl @header || @impl.start_node end |
#ret_type ⇒ Object
255 256 257 |
# File 'lib/xdry/parsing/model.rb', line 255 def ret_type header_or_impl.ret_type end |
#to_s ⇒ Object
262 263 264 |
# File 'lib/xdry/parsing/model.rb', line 262 def to_s header_or_impl.to_s end |