Module: Seriline
- Defined in:
- lib/seriline/response_data.rb,
lib/seriline.rb,
lib/seriline/order.rb,
lib/seriline/client.rb,
lib/seriline/errors.rb,
lib/seriline/request.rb,
lib/seriline/session.rb,
lib/seriline/version.rb,
lib/seriline/endpoint.rb,
lib/seriline/config_product.rb,
lib/seriline/responses/login_response.rb,
lib/seriline/responses/order_info_response.rb,
lib/seriline/responses/available_config_products_response.rb,
lib/seriline/responses/config_product_single_order_response.rb
Overview
This class represents a simple struct like object.
-
Permitted attributes must be defined with ‘attr_reader`
-
When initialized attribute keys will be snake cased. For example { CamelCase: “Hello world!” } would set the instance variable @camel_case
Example:
class PersonResponse < Seriline::ResponseData
attr_reader :name, :email
end
PersonResponse.new(
name: "Bob",
email: "[email protected]",
password: "secret"
)
> #<PersonResponse:0x007fca321df778 @name=“Bob”, @email=“[email protected]”>
Defined Under Namespace
Classes: AvailableConfigProductNode, AvailableConfigProductsResponse, Client, ConfigProduct, ConfigProductSingleOrderResponse, Configuration, Endpoint, Error, LoginResponse, Order, OrderInfoResponse, Request, RequestFailedError, ResponseData, Session
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
12 13 14 |
# File 'lib/seriline.rb', line 12 def config @config end |
Class Method Details
.configure {|config| ... } ⇒ Object
15 16 17 18 |
# File 'lib/seriline.rb', line 15 def self.configure self.config ||= Configuration.new yield(config) end |