Class: Squib::DSL::Hand
- Inherits:
-
Object
- Object
- Squib::DSL::Hand
- Includes:
- WarnUnexpectedParams
- Defined in:
- lib/squib/dsl/hand.rb
Instance Attribute Summary collapse
- #deck ⇒ Object readonly
- #dsl_method ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(deck, dsl_method) ⇒ Hand
constructor
A new instance of Hand.
- #run(opts) ⇒ Object
Methods included from WarnUnexpectedParams
Constructor Details
#initialize(deck, dsl_method) ⇒ Hand
Returns a new instance of Hand.
19 20 21 22 23 |
# File 'lib/squib/dsl/hand.rb', line 19 def initialize(deck, dsl_method) @deck = deck @dsl_method = dsl_method = deck. end |
Instance Attribute Details
#deck ⇒ Object (readonly)
17 18 19 |
# File 'lib/squib/dsl/hand.rb', line 17 def deck @deck end |
#dsl_method ⇒ Object (readonly)
17 18 19 |
# File 'lib/squib/dsl/hand.rb', line 17 def dsl_method @dsl_method end |
Class Method Details
.accepted_params ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/squib/dsl/hand.rb', line 25 def self.accepted_params i( file dir range radius angle_range margin fill_color trim trim_radius ) end |
Instance Method Details
#run(opts) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/squib/dsl/hand.rb', line 33 def run(opts) warn_if_unexpected opts range = Args.extract_range opts, deck sheet = Args.extract_sheet opts, deck, {file: 'hand.png'} hand = Args.extract_hand_special opts, deck deck.render_hand(range, sheet, hand) end |