Class: Shortwave::Facade::Build::RubyMethod
- Inherits:
-
Object
- Object
- Shortwave::Facade::Build::RubyMethod
- Defined in:
- lib/shortwave/facade/build/facade_builder.rb
Overview
A ruby method in a RemoteFacade that will be generated
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#signature ⇒ Object
Returns the value of attribute signature.
Instance Method Summary collapse
-
#initialize(node) ⇒ RubyMethod
constructor
A new instance of RubyMethod.
Constructor Details
#initialize(node) ⇒ RubyMethod
Returns a new instance of RubyMethod.
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/shortwave/facade/build/facade_builder.rb', line 79 def initialize(node) @comment = [] @body = [] @node = node @parameters = node.parameters || [] @required, @optional = (@parameters).partition {|p| p.required? } @required.reject! {|p| [:api_key, :api_sig, :sk].include?(p.name) } build_comment build_signature build_body self end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
77 78 79 |
# File 'lib/shortwave/facade/build/facade_builder.rb', line 77 def body @body end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
77 78 79 |
# File 'lib/shortwave/facade/build/facade_builder.rb', line 77 def comment @comment end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
77 78 79 |
# File 'lib/shortwave/facade/build/facade_builder.rb', line 77 def name @name end |
#signature ⇒ Object
Returns the value of attribute signature.
76 77 78 |
# File 'lib/shortwave/facade/build/facade_builder.rb', line 76 def signature @signature end |